Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSUserDefaults causes app reject

Apple testers have been rejected our app due violating of guideline:

[2.23 Apps must follow the iOS Data Storage Guidelines or they will be rejected]

Since we have stored our database files without the NSURLIsExcludedFromBackupKey flag - it was backed up in the iCloud - and caused the reject.

So, we added the NSURLIsExcludedFromBackupKey flag to our files, and it decreased the amount of data stored in the iCloud.

BUT - we realized that NSUserDefaults also takes some amount of space in the iCloud. We are using [NSUserDefaults standardUserDefaults] and we don't have much control of it.

If we go to device->settings->iCloud->Storage & BackUP->Manage Storage, we can see that our app still takes 0.5 kb of data in the iCloud, because of using NSUserDefaults. (removing the uses of NSUserDefaults in the code will decrease it to 0 - no data)

Will Apple reject our app again for the NSUserDefaults takes data in the iCloud?

like image 945
igoren Avatar asked Jun 22 '12 06:06

igoren


1 Answers

You can use any amount of data in NSUserDefaults in your app and you will not get rejected. I'm not sure what the max data is for it, but I don't recall Apple specifying a limit. There is however a limit to the iCloud defaults settings. You can back up your NSUserDefaults to iCloud, but there is a strict 1Mb limit for data saved there. So be mindful of how large your data gets when saved there.

like image 147
Bill Burgess Avatar answered Nov 12 '22 11:11

Bill Burgess