Search code examples
iosiphonexcodeipadicloud

iOS iCloud Containers: are these two containers the same?


What I did

I built an iOS 7 app, using default options for anything iCloud related. In Xcode 6, I now see that in my project, on my main target, under capabilities, under iCloud - it shows that my app does not use the default container. If I select "Use default container" it changes the URL.

iOS 7 format - "ABC123ABCD.com.companyname.product"
iOS 8 default - "iCloud.com.companyname.product"


Questions

  • If I change to the iOS 8 default, will users loose their documents, OR - are these effectively the same directory?

  • Why the change? What's the difference? Any clarity around this change would be really helpful.


Solution

  • Those are not the same containers. Existing data from the first container will not be accessible in the second container.

    Existing containers of your live apps are still accessible, but as of Xocde 6.0.1 it appears that it is required for new containers to begin with iCloud.

    Why this has changed probably has to do with Cloud Kit, but why Apple have not told us developers about this change or how to handle it appropriately is beyond me, and absolutely ludicrous I think. This change is fundamental, causes lots of headaches and has not been implemented in beta versions of Xcode 6.