On Nov 4, 2011, at 1:41 PM, Martin Hewitson wrote:

> 
> On 4, Nov, 2011, at 02:01 AM, Roland King wrote:
> 
>> 
>> 
>> 
>> 
>>> 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.
>>> 
>> 
>> Not so. I have a core data app running using icloud and an XML store. This 
>> is ios by the way and the store is not incremental, it's just being treated 
>> as a blob which is fully synced each time but it's small so that's ok. 
>> 
>> Definitely if you want the incremental log style store you have to use SQL 
>> but in general core data in iCloud will let you use whatever you like.
> 
> I hadn't realised that I had made a choice. How does one choose an 
> incremental store as opposed to a blob? Any pointers how you got your 
> core-data iCloud app working would be greatly appreciated!

Those two keys you add when you open the persistent store, 
NSPersistentStoreUbiquitousContentNameKey and 
NSPersistentStoreUbiquitousContentURLKey are the ones which tell Core Data 
you're using the log file based core data (only available with SQLite). So with 
that store, the actual SQLite database isn't in the cloud, it's kept local, but 
a log file directory is created which is in the cloud and deltas are synched up 
there. The idea is that each client just brings down the log files and updates 
the database at a record level. Those keys only mean anything with the SQLite 
store, which may be why you're having issues with migration. I don't use any of 
those keys, I just have my store as a local file which is synched wholesale. 

For your original mail, you want to migrate to SQLLite and then also migrate to 
iCloud. I don't know if you can do that easily in one step. If I were looking 
at this I would probably think of creating a new SQLLite store for the 
migration, empty, opening the old local XML store and then migrating the 
objects over with code. Whether you choose to make the new SQLite store local 
and then migrate it up to iCloud or make it in the cloud and then update it is 
a question I don't have a good answer to, I'm still a little confused by how 
the initial log files get magically created when you migrate a document to 
iCloud, I'm definitely missing a piece of information somewhere. 
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to