-
Notifications
You must be signed in to change notification settings - Fork 467
iCloud storage exceeded #84
Comments
Hi, The problem is that iOS creates a backup of the |
Adding the below to config.xml seems to fix the issue for me: |
This could do the trick, but I think I'll still have to exclude plugin folders from being backed up. |
I think you are right @nikDemyankov. I'm not entirely sure of how it works in practice. I'm guessing that it might be possible that it gets backed up to icloud twice, with both the app asset files and the webview cache of the same files being backed up to iCloud. However, my understanding is that setting the BackupWebStorage preference to local just disables backup of the webview stuff to icloud, localstorage and cookies etc. But it is kind of weird if it actually backs up the cache as well. Perhaps it solves my problem simply because I'm just lucky to get below the threshold when the localstorage etc. is not being copied to iCloud. |
Thanks @hassellof. Apparently that didn't work though. The people from apple pointed me towards this documentation: https://developer.apple.com/library/ios/qa/qa1719/_index.html |
@10goC yes, this is what I'm planning to do. Luckily, all files are stored in one main directory, so if I understood correctly from the docs - I just need to tell iOS not to back up this particular folder, and this will be enough. Although, I can't check if this really helped, because this can be checked only by submitting new version of the app on the App Store. |
@nikDemyankov If you can test on an iOS device, you can go to settings / iCloud / storage / manage storage / [Device name] and there you can see the amount of space each app stores on iCloud. I'm trying to implement this fix myself for this app. I'll tell you if I have any success. Thanks! |
Thanks for the info. If you are trying to fix this in the plugin itself, then it should be done in this method. |
@nikDemyankov thanks for the tip! It worked like a charm. Here's how I put it: /**
* Add skip backup attribute to file to prevent automatic storage in iCloud
*
* @param filePathString the path to the file
*
* @return BOOL true on success, false on failure
*/
+ (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *) filePathString; HCPFilesStructure.m + (NSURL *)pluginRootFolder {
NSURL *supportDir = [[NSFileManager defaultManager] applicationSupportDirectory];
NSURL *pluginRootFolderUrl = [supportDir URLByAppendingPathComponent:CHCP_FOLDER isDirectory:YES];
if([[NSFileManager defaultManager] fileExistsAtPath: pluginRootFolderUrl.path]){
[[self class] addSkipBackupAttributeToItemAtPath:pluginRootFolderUrl.path];
}
return pluginRootFolderUrl;
} And of course the code for |
Good that it worked out for you :) Will add this in the next version. |
Released in v1.2.4. |
Hi
My app is being rejected by apple because it stores more than 20mb on iCloud storage.
I know that this is related to this plugin, but I don't know how to prevent it.
Do you have any clue?
Thanks!
The text was updated successfully, but these errors were encountered: