iOS App Submission Rejection - ios

When i submit my iOS app i got following rejection issues from apple.
On launch and content download, your app stores 13.14MB on the user's iCloud, which does not comply with the iOS Data Storage Guidelines.
Next Steps
Please verify that only the content that the user creates using your app, e.g., documents, new files, edits, etc. is backed up by iCloud as required by the iOS Data Storage Guidelines. Also, check that any temporary files used by your app are only stored in the /tmp directory; please remember to remove or delete the files stored in this location when it is determined they are no longer needed.
Data that can be recreated but must persist for proper functioning of your app - or because users 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 kCRUFLIsExcludedFromBackupKey attribute.

Your App stores data in the users iCloud. This is only alowed to a certain degree.
The 13,14 MB your app stores to the cloud is just too much.
I never submitted an app to Apple, but the error message is clear and defined.
Take a look on your app and what it does store in the iCloud. Reduce the size or just dont write to iCloud.
Hope it helps...
*edit
Why would one write to the iCloud anyways? Just write on the phone memory.

Do you call a web service on App launch which stores data in the App's documents directory? Or do you store some other data in the App's documents directory?
By default all the data in the App's documents directory is synced to iCloud. So any data that can be recreated later (unlike session data) must not be stored on the documents directory.
So instead save data in the App's Temp directory.
To do that have a look at this- How to save images and recoded files in temp directory?
Another option is you have is How to use addSkipBackupAttributeToItemAtURL API?

Related

Save user defaults to iCloud

I don't have any important data in my app. But when i read this tutorial i have a few questions ?
Only documents and other data that is user-generated, or that cannot
otherwise be recreated by your application, should be stored in the
/Documents directory and will be automatically
backed up by iCloud.
Do i need to save UserDefaults to iCloud ? And will my app approve if i don't use iCloud ?
And if i need can you show me how to save user default settings ? Because i found only tutorials how to save data from database.
You misunderstand what that is saying.
When a user backup's up their devices using iTunes or iCloud, only certain parts of the app's sandbox is backed up. So there are two important aspects here:
Only backup data that can't be replaced.
Be sure to backup irreplaceable data.
NSUserDefaults is one of the things that will be backed up for you. You don't need to do anything special.
You don't need iCloud support unless your app has a specific need to use it.

How can I confirm that iCloud Backup is enabled for my app?

I have an iOS app that stores large amounts of data on the device. We rely on iCloud Backup to preserve data in case the user replaces or resets their device.
Unfortunately, users sometimes disable iCloud backup for just our app to save space on iCloud; then, months later, they attempt to restore data onto their new device but there's no app data to restore because they stopped backing it up.
I'd really, really like to be able to find out if the user has iCloud Backup checked for our particular app, so we can give users occasional alerts warning them that their data is not being backed up.
Is there any way to programmatically determine whether my app has the iCloud Backup slider set to ON or OFF?
Take a look at the ubiquityIdentityToken property on NSFileManager it should be non-nil if iCloud is setup and enabled for your app.
You can't. That is because you don't say to iCloud Backup that you want your app to be backed up, it just takes NSUserDefaults and files (not flagged) from DocumentsDirectory and saves them.
You could better write an Alert to give more information why is so important having this backup on and show her once.
Oh and please bear in mind that storing to iCloud non-user-generated content may lead to reject your app because:
Important: Apps should avoid mingling app data and user data in the
same file. Doing so will unnecessarily increase backup sizes and can
be considered a violation of the iOS Data Storage Guidelines.

How to save my data in iOS document folder?

My application need to save data to my local database. The reason why I want to save it to document folder is I want the data shared by all devices with the same iCloud account. What I normally do is to copy the empty database from my Bundle into my document folder the first time when the app launch. But I'm not very sure it will be rejected by Apple or not? (Because one of my app which preloading a database into document folder was rejected.) Do you have better strategy? (I know I can save the data into library folder. But the data will not be synchronized then.)
Thanks.

iCloud sync files and core data

In my app I save images in file manager and their metadata(image name,created date,notes and image path) in core data.
I want to know the best practice to sync these data using iCloud.
If you save the images in the ubiquity container they will be synchronised across devices. However you may need to store a relative pathname rather than an absolute pathname.
If you take a look at the the sample apps at the link below you will find the app uses iCloud to synchronise the Core Data database using transaction logs and it uses iCloud to synchronise the backup files the user makes. So while this is not exactly what you want it would be pretty easy to modify the code for saving the backup files to iCloud to save your files to iCloud.
You do need to remember that iOS will not automatically download files from iCloud so you would have to do that from your App prior to trying to use them on the device.
http://ossh.com.au/design-and-technology/software-development/

Where store User Settings iOS - App Store

in the message of the resolution center (App Store) I received the following message:
"The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., may be stored in the /Documents directory - and backed up by iCloud.".
In my iOS application I store the "Settings" in a SQLite file. That I create just one time and gets modified by the user when he requires to do those changes. The size of this file is about 20kb and I'm storing it in Documents (as Critical Data). It is correct to do this?.
Yes this is correct. If you reply to them and tell them what you've said above, they'll probably allow you to pass the review. Just make it clear that it's user created/modified and needs to be backed up.
Source: This happened to us as well and we challenged and got accepted.
Note: You could save settings in the NSUserDefaults instead if you don't want to have to challenge them.

Resources