错误描述:
2.23: Apps must follow the iOS Data Storage Guidelines or they will be rejected
In particular, we found that on content download, your app stores 19.32+ mb of data. To check how much data your app is storing:
- Install and launch your app
- Download dictionaries
- Go to Settings > iCloud > Storage & Backup > Manage Storage
- If necessary, tap "Show all apps"
- Check your app's storage
主要原因是你放到docments下的文件过大导致的,解决方法
添加代码
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
[self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:documentsDirectory]];
return YES;
}
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
NSError *error = nil;
NSLog(@"addSkipBackupAttributeToItemAtURL");
BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
forKey: NSURLIsExcludedFromBackupKey error: &error];
if(!success){
NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
}
return success;
}
官网解决方案:
https://developer.apple.com/library/ios/qa/qa1719/_index.html