Apple App Store Heisman

3284
4
Jump to solution
07-21-2015 02:19 PM
AndyWright
Occasional Contributor

Our app got rejected in the Apple App Store for the following reason:

"On launch and content download, your app stores 2.11 gb on the user's iCloud, which does not comply with the iOS Data Storage Guidelines."

We've had previous versions of this app approved on the app store and absolutely nothing has changed with the amount of data that it deals with.  We're not sure where this whole iCloud thing has come from, but we did some research on preventing an application from storing data on iCloud.  This is what we found:

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.

Best we can tell this is information pertaining to Objective C.  Does anyone have any experience doing this sort of thing inside of a Qt app.  I'm assuming there might be some C++ code we can inject somewhere in our app that may get us over the hump.  I did some Googling on this and found nothing helpful within the Qt realm.  Any help on this would be greatly appreciated.

0 Kudos
1 Solution

Accepted Solutions
ShobanaSuresh
Esri Contributor

Hi Andy,

Apple's documentaion File System Basics states that the files stored in temp folder will not persist between launches of your app.

The discussion in IOS How do I prevent files from being backed up to iCloud and iTunes | Qt Forum  also suggests using Objective-C code to solve this problem.

cc: Lucas Danzinger

Thanks

Shobana

View solution in original post

4 Replies
LucasDanzinger
Esri Frequent Contributor

Andy-

From reading through StackOverflow and some Apple doc, it seems you have a few options. The issue is that anything in the Documents folder will get backed up unless you explicitly tell it not to. See this stack overflow thread http://stackoverflow.com/questions/16521080/how-to-remove-automatically-data-backup-from-icloud-in-i...

One thing you could try is on iOS, actually saving your data to the temp folder instead of documents. The Extras plugin has a function that returns the temp location - ArcGIS Runtime QML Extras: System Class Reference

Otherwise, it seems you need to write some Objective C, and would need to integrate that with Qt somehow. This would be need to tell the app to back up your Documents folder, but to exclude some certain subfolders. This is explained here Technical Q&A QA1719: How do I prevent files from being backed up to iCloud and iTunes? You will need to use either the addSkipBackupAttributeToItemAtURL or addSkipBackupAttributeToItemAtPath methods. Once you add the Objective C Class, you will need to look into calling this from within Qt (ex: [SOLVED]Using objective-c class in qt c++ | Qt Forum )

Hope this helps. The temp location may be the quickest solution, but that decision is up to you.

Thanks,

Luke

0 Kudos
AndyWright
Occasional Contributor

Thanks for the feedback Luke. That doesn’t sound too pleasant. It’s weird because our app has made it through the gauntlet a couple times before with the same amount of data being stored in the same location. I wonder why it got flagged this time??? Anyway, I think we will look into the temp location solution. We did have an issue previously where our data was getting wiped from the iOS device every so often. That is why we moved it to Douments, which did solve that problem. Moving it to temp could reintroduce that old issue, but we’ll give it a shot and see what happens.

0 Kudos
ShobanaSuresh
Esri Contributor

Hi Andy,

Apple's documentaion File System Basics states that the files stored in temp folder will not persist between launches of your app.

The discussion in IOS How do I prevent files from being backed up to iCloud and iTunes | Qt Forum  also suggests using Objective-C code to solve this problem.

cc: Lucas Danzinger

Thanks

Shobana

LucasDanzinger
Esri Frequent Contributor

I've heard from someone that using QStandardPaths::CacheLocation does not get backed up to iCloud automatically, so if anyone else runs into this problem, maybe they can try storing offline data to the CacheLocation.

0 Kudos