Here is my experience with trying to upgrade a core-data sandbox app to use
sandboxing and iCloud.
1) A core-data shoebox app with no sandbox, no iCloud entitlements, XML store
type
2) A core-data shoebox app with sandbox, iCloud integration, SQL store type
Starting from 1), how do I get to 2)?
Here are the individual steps which I have working in isolation
a) migration from XML store to SQL store
b) sandbox with migration of core-data store to the new container directory
But, I can't figure out a way to do both a) and b) in one move. If I switch on
sandboxing and add my container-migration.plist, and try to migrate the store
at the same time, then the app runs and appears to work fine, but I get a lot
of console errors saying
+entityForName: could not locate an NSManagedObjectModel for entity name XXX
This doesn't happen if I do either a) or b).
Now for iCloud. If I avoid sandboxing, do the store migration to SQL and add
the necessary iCloud keys to the persistent store coordinator options
(NSPersistentStoreUbiquitousContentNameKey and
NSPersistentStoreUbiquitousContentURLKey), then all looks well. If I don't do
the store migration then I get errors like
[NSXMLObjectStore connection]: unrecognized selector sent to instance
So, can I conclude from this that iCloud and core-data only works with SQL
store? The WWDC video hints at this, but was not explicit.
Now, I have no idea if the core-data store has actually been pushed up to the
cloud. How can I see that? I will try next to run the app on another machine
and see what happens.
So, a few steps in perhaps the right direction, but upgrading to all these new
technologies is far from trivial. I guess I can go with store migration and
iCloud for one release (assuming iCloud syncing is actually working), and then
go with sandboxing in the next release. But what happens if a user skips a
release? I guess badness will result. Hmm…
Comments welcome,
Martin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: [email protected]
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]