> Has anyone come across a sample app which demonstrates how to make a shoebox
> core data app which works with iCloud? I've dug into the documentation but I
> can't find any sample code. The "What's new in Core Data on Mac OS X" session
> from WWDC 2011 hints at some things but doesn't show any sample code. I think
> I've managed to get the app to register with iCloud by fighting with the
> provisioning profile stuff, but I don't see the app appearing in the iCloud
> preferences list of app (maybe it isn't supposed to?) but when I click on
> "Manage" then I see an app which has appeared but it's called "Unknown" and
> it has a fraction of the amount of data I'd expect. Then I tried the app on
> another machine and I get some notifications of type
> NSPersistentStoreDidImportUbiquitousContentChangesNotification together with
> lots of console messages starting with "_PFUbiquityRecordImportOperation
> processObjects:withState:withGlobalIDIndexesToLocalURIMap:andImportContext:outError"
> which seem to indicate some action has taken place. Now I'm stuck with what
> to do with these notifications. The WWDC sessions says one should use methods
> of the NSFilePresenter protocol, but I'm unsure how to go about this. Some
> sample code for the app shown in the WWDC session sure would help.
Hi Martin,
It sound like you did not include NSPersistentStoreUbiquitousContentNameKey as
part of the options dictionary when creating your persistent store coordinator
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:uuid_string,
NSPersistentStoreUbiquitousContentNameKey, nil];
[persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType
configuration:nil
URL:storeUrl
options:nil
error:&error])
It's tricky to figure out exactly what to do. I found this Using Core Data with
iCloud Release Notes under "Guidance for Library-style Applications".
Hope this helps
Marc_______________________________________________
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]