Sunday 15 July 2012

ios - Application size won't change in iCloud after do not backup flag is set -


I have found many similar questions:

I've added the code described in link 2: I Calling method after downloading the picture and saving it in the directory.

  - (BOOL) addSkipBackupAttributeToItemAtURL: (ns URL *) url {([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); If (& amp; NSURLIsExcludedFromBackupKey == NULL) {// use iOS 5.0.1 system const char * filePath = [[URL Path] File System Performance]; Const char * attrName = "com.apple.MobileBackup"; U_int8_t attrValue = 1; Int result = set extretter (file path, etriname, and attributes, sizeoff (attrivue), 0, 0); Return result == 0; } Else {// use NSURLIsExcludedFromBackupKey mechanism, IOS 5.1+ NSError * Error = Zero; BOOL success = [URL setrSourceValuue: [NSNumber NumberVithibles: Yes] For: NSROMLXMyFeedback Error: & amp; Error]; If (! Success) {NSLog (@ "error except% @ from backup% @", [last blanket blanket of URL], error); } And {nslog (@ "path% @:", [url path]); } // Check your error and take the success of the appropriate action refund; }   

}

When the size of the application to check in iCloud is still 50.7 Mb (I'm testing 5.1.1 on the iPhone with iOS version), then There was no effect of the flag by using, although "yes" is the value in the success please tell me what I am doing wrong?

The path to the problem path path was in the method. Currently I have been replaced with fileURLTH: Guide: And everything works great for ICloud storage as shown in the size 0.9 KB (previously it was 50.7 MB) for storage.

No comments:

Post a Comment