IOS How do I prevent files from being backed up to iCloud and iTunes
I am going through the process of trying to get my app on to the Apple App Store. After several rejections, here is one that has stumped me...
My App, when it first opens gets a file out of its own qrc resource file and puts it in the documents folder (sandboxed of course, so it will get removed when app is uninstalled).
Apple have rejected because this file should not get backed up by iCloud, because it wasn't created by the user, but the App.
Is there any way of suggesting that the file should not get backed up by iCloud?
Did you try using the TempLocation or DataLocation from QStandardPaths ?
No, I used DocumentLocation, whoops! I guess DataLocation would be best in this case. Are we saying that DataLocation won't get backed up by iCloud?
Sorry, just looked at the code, this is what I use:
QDir dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
I don't say it, it's just an idea to try. "Here":https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html you can find more information about how the file system can/should be used
It seems as though the only place to put data that won't get backed up is Library/Caches. But it does suggest that the system could delete the contents of it to free up disk space (on rare occasions).
Application Support seems perfect, but that is also backed up.
Not sure about doing it in Qt but in objective-c you can set a flag on a file to tell it not to back up to the cloud, and yes Apple will clear out your data under certain conditions, test and replace your files if needed.
You can mix Objective-C code and C++. Qt uses that technique for it's OS X/iOS part.