Meine App wurde nicht zugelassen wegen Daten für den iCloud Backup.
Genauer heißt es:
So gut dachte ich mir, dann machste halt folgendes:
Alles anzeigen
wird in aufgerufen.
Auf dem Mac navigiere ich per Terminal zu
/Library/Application Support/iPhone Simulator/7.1/Applications/9224585D-9B05-44E5-8A84-1AEFB56E4579
und gebe ein:
Das Ergebnis lautet:
Alles anzeigen
Wenn ich das richtig verstehe dann steht da:
Ich spiele die App neu aufs iPad. iCloud Backup ist aktiviert. iOS 7.1.2, iPad Air.
Ich navigiere zu Settings > iCloud > Storage & Backup > Manage Storage > My iPad > Show All Apps Und meine App taucht mit 4.2 MB auf.
Die App ist unter Settings > General > Usage > Show all Apps My App 11 MB groß.
Kommt nun meine App durch den Review Prozess? Hab ich was falsch gemacht? Gibt es einen anderen Weg? Nach dem installieren per Xcode tauchen diese blöden 4.2 MB auf und ich weiß nicht wieso
CouchDB und Piwik kommen als "spezielle" Extras in der App vor, sonst ist alles von mir.
Genauer heißt es:
We found that your app does not follow the iOS Data Storage Guidelines, which is required per the App Store Review Guidelines.In particular, we found that on launch and/or content download, your app stores 4.04 MB. To check how much data your app is storing:- Install and launch your app- Go to Settings > iCloud > Storage & Backup > Manage Storage - If necessary, tap "Show all apps" - Check your app's storageThe iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., should be backed up by iCloud. Temporary files used by your app should only be stored in the /tmp directory; please remember to delete the files stored in this location when the user exits the app.Data that can be recreated but must persist for proper functioning of your app - or because customers expect it to be available for offline use - should be marked with the "do not back up" attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCFURLIsExcludedFromBackupKey attribute. For more information, please see Technical Q&A 1719: How do I prevent files from being backed up to iCloud and iTunes?.
So gut dachte ich mir, dann machste halt folgendes:
Quellcode
- -(BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)fileURL {
- if (![[NSFileManager defaultManager] fileExistsAtPath:[fileURL path]]) {
- NSLog(@"File %@ doesn't exist!",[fileURL path]);
- return NO;
- }
- NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
- if ([currSysVer isEqualToString:@"5.0.1"]) {
- const char* filePath = [[fileURL path] fileSystemRepresentation];
- const char* attrName = "com.apple.MobileBackup";
- u_int8_t attrValue = 1;
- int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
- NSLog(@"Excluded '%@' from backup",fileURL);
- return result == 0;
- }
- else if (&NSURLIsExcludedFromBackupKey) { //iOS 5.1 and later
- NSError *error = nil;
- BOOL result = [fileURL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:&error];
- if (result == NO) {
- NSLog(@"Error excluding '%@' from backup. Error: %@",fileURL, error);
- return NO;
- }
- else { // Succeeded
- NSLog(@"Excluded '%@' from backup",fileURL);
- return YES;
- }
- } else {
- // iOS version is below 5.0, no need to do anything because there will be no iCloud present
- return YES;
- }
- }
- // now call above method from where you are storing your files/folders in NSDocumnetsDirectory
- -(BOOL) doNotBackUpMyFolderOrFile {
- NSString *applicationCacheDir = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory,
- NSUserDomainMask,
- YES) lastObject];
- NSURL *pathURL= [NSURL fileURLWithPath: applicationCacheDir isDirectory:YES];
- NSArray *paths = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask];
- NSURL *documentsURL = [paths lastObject];
- NSURL *tmpURL = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES];
- if ([self addSkipBackupAttributeToItemAtURL:documentsURL] &&
- [self addSkipBackupAttributeToItemAtURL:pathURL] &&
- [self addSkipBackupAttributeToItemAtURL:tmpURL] ) {
- return YES;
- }
- return NO;
- }
wird in aufgerufen.
Auf dem Mac navigiere ich per Terminal zu
/Library/Application Support/iPhone Simulator/7.1/Applications/9224585D-9B05-44E5-8A84-1AEFB56E4579
und gebe ein:
Das Ergebnis lautet:
Quellcode
- total 176
- drwxr-xr-x@ 8 user staff 272 Jul 8 16:18 .
- com.apple.installd.container_bundle_id 35
- com.apple.installd.container_creation_os_build 7
- drwxr-xr-x 13 user staff 442 Jul 8 17:42 ..
- -rw-r--r--@ 1 user staff 6148 Jul 8 16:53 .DS_Store
- com.apple.FinderInfo 32
- drwxr-xr-x@ 7 user staff 238 Jun 17 13:03 Documents
- com.apple.metadata:com_apple_backup_excludeItem 22
- drwxr-xr-x 6 user staff 204 Jul 8 16:53 Library
- drwxr-xr-x 59 user staff 2006 Jul 8 16:24 APPNAME.app
- -rw-r--r-- 1 user staff 80109 Jun 17 11:24 iTunesArtwork
- drwxr-xr-x 2 user staff 68 Jul 8 16:22 tmp
Wenn ich das richtig verstehe dann steht da:
Ich spiele die App neu aufs iPad. iCloud Backup ist aktiviert. iOS 7.1.2, iPad Air.
Ich navigiere zu Settings > iCloud > Storage & Backup > Manage Storage > My iPad > Show All Apps Und meine App taucht mit 4.2 MB auf.
Die App ist unter Settings > General > Usage > Show all Apps My App 11 MB groß.
Kommt nun meine App durch den Review Prozess? Hab ich was falsch gemacht? Gibt es einen anderen Weg? Nach dem installieren per Xcode tauchen diese blöden 4.2 MB auf und ich weiß nicht wieso
CouchDB und Piwik kommen als "spezielle" Extras in der App vor, sonst ist alles von mir.