0

In Apple's Document Based App Development Guide, it emphasizes that our app should let users choose either to save all their files to iCloud or save all on local device. Is there reason for this? Can we actually allow users to pick some files to be saved on iCloud and some to be saved locally, like the TextEdit app on mac OS X? Will App Store disapprove iOS apps configured in this way if it is programmatically possible?

Thanks!

CodeBrew
  • 6,457
  • 2
  • 43
  • 48
  • Apple will most likely reject the app and they do test to see that files are properly migrated from local storage to iCloud storage and visa versa when the user changes the iCloud settings. They rejected my App initially because under some edge cases the iCloud files were not being removed and even though the user would not see these files there were files in both the local /Documents directory and the iCloud /Documents directory at the same time. – Duncan Groenewald Jan 12 '14 at 00:17
  • 1
    If you have a very good reason you should include a detailed explanation in your submission including explanation for how this is not going to create confusion for the user. My App had a section for local files and a different section for cloud files and it was rejected initially, after that it was again rejected because of an edge case were iCloud files were not being removed after migration to local storage. – Duncan Groenewald Jan 12 '14 at 00:17
  • Duncan, so were you eventually able to take care of those edge cases and gained approval for App Store? – CodeBrew Jan 12 '14 at 03:37
  • Yes but app storage is either local or iCloud depending on users selected preference. – Duncan Groenewald Jan 12 '14 at 03:48
  • I see, basically your app still had to follow the guideline. Could you put your comments here as an answer so I can select it? It's a more concrete example I'm looking for, rather than just what the document says. – CodeBrew Jan 12 '14 at 04:40

2 Answers2

2

Here is a link

https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/DocumentBasedAppPGiOS/ManageDocumentLifeCycle/ManageDocumentLifeCycle.html#//apple_ref/doc/uid/TP40011149-CH4-SW1

Setting the Preferred Storage Location for Document Files

All documents of an application are stored either in the local sandbox or in an iCloud container directory. A user should not be able to select individual documents for storage in iCloud.

When an application launches for the first time on a device, it should do the following:

If iCloud is not configured, ask users if they want to configure it (and, preferably, transfer them to Launch Settings if they want to configure iCloud). If iCloud is configured but not enabled for the application, ask users if they want to enable iCloud—in other words, ask if they want all of their documents saved to iCloud. Store the response as a user preference. Based on this preference, an application writes document files either to the local application sandbox or the iCloud container directory. (For details, see “Moving Documents to and from iCloud Storage.”) An application should expose a switch in the Settings application that enables users to move documents between local storage and iCloud storage.

Duncan Groenewald
  • 8,496
  • 6
  • 41
  • 76
  • This part of document has two points: 1) as a guideline, we should not allow users to select individual documents for storage in iCloud; 2) technically, we should check users default storage preferences (iCloud or device) and save and retrieve correspondingly. On the technical side we can certainly bypass this default setting but locate the file one by one as specified by the user. What I'm really concerned is about the guideline part. – CodeBrew Jan 12 '14 at 02:59
  • Yes technically it's easy to put documents anywhere but they will probably reject that. Look at Pages or Numbers as examples - that's what I ended up using to check what would be acceptable. Neither of these give you a choice for individual files. – Duncan Groenewald Jan 12 '14 at 03:53
0

If it makes sense for your app, there is no reason Apple would care if you save some files locally and some in iCloud. It's not a hard fast rule to be all one way or the other.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • This is how I deem reasonable too, but in the chapter "Managing the Life Cycle of a Document", under the section "Setting the Preferred Storage Location for Document Files", it emphasizes: "All documents of an application are stored either in the local sandbox or in an iCloud container directory. A user should not be able to select individual documents for storage in iCloud." That's how my question comes up. – CodeBrew Jan 11 '14 at 23:41
  • That's just a guideline. It makes sense in most cases. Apple likes to keep things simple for the user. Minimal choices. But if it makes sense for your app to give the user the choice then go for it. It's highly unlikely that Apple will reject an app that gives the user a choice. – rmaddy Jan 11 '14 at 23:46
  • In fact, iCloud stores files on the device in order to integrate it more seamlessly, so that the user does not have to wait for syncs to occur before using the data. – erdekhayser Jan 12 '14 at 00:15
  • @foriinrangeawesome is this true? Is there any document or link supporting this claim? – CodeBrew Jan 12 '14 at 03:58
  • If you look at apples documentation, it talks about a .nosync folder where local copies are stored. If you are a registered developer, check it out. – erdekhayser Jan 12 '14 at 14:53