If I try to backup up my database file using the uploadUrl method, when I next try to access the database using Core Data I get the following error:
CoreData: error: -executeRequest: encountered exception = I/O error for database at /var/mobile/Containers/Data/Application/2B4358FA-A339-49B0-8F7E-6D04CE21C7F7/Documents/SpendingTracker.sqlite. SQLite error code:6922, 'disk I/O error' with userInfo = {
NSFilePath = "/var/mobile/Containers/Data/Application/2B4358FA-A339-49B0-8F7E-6D04CE21C7F7/Documents/SpendingTracker.sqlite";
NSSQLiteErrorDomain = 6922;
}
The Dropbox Sync SDK used to have a 'shouldSteal' option when loading. According to the documentation this would cause the file to be copied before uploading. I did this myself by making a temp copy, uploading that and then deleting it afterwards. The problem then went away, but it would be good if the framework handled it for you, or the issue was documented.