I have been working with coredata and icloud and it’s very interesting because each instance of your app, on each device connected to an iCloud account, maintains its own local core data store file. when data changes locally, Core Data writes change log files to you app’s default ubiquity container.
the log files that have been changed are uploaded to icloud and downloaded to each of a users’s other devices
when you use icloud you must take care when designing the app launch order because there are many thing you must consider for example
1. The user may not have iCloud available on his device
2. The user might switch to another account
3. You might want to use a fallback store as “iCloudstore” to store the data when iCloud is turned of
With core data you can manage your data with the Core Data Model Editor, it provides graphical and table-based tools to edit your data and also the relationships with each other.
The editor is made up of two components
1. The components area (left side)
2. The detail area (right side)
The information on the left side is are the components for example entities, fetch requests and configurations.
also the configurations are important to use so you can decide which data goes in each store, if you don’t give it a name you wil have to use “PF_DEFAULT_CONFIGURATION_NAME” when creating a persistentStore. the problem i had was that i used “Default” as name, because in the editor it is shows default as name.
on the right side you have the details where you can determine which type you want for each entity, for example if you have a Person entity with a name as attribute you can give it a String as type.