Note that there are some explanatory texts on larger screens.

plurals
  1. POiCloud + Core Data - When to know to seed the iCloud core data store?
    primarykey
    data
    text
    <p>I am working to implement iCloud core data sync in my iPhone app. I am working on the user workflow, and the problem that I am encountering is trying to figure out when my app should "seed" the data to iCloud. This can happen under two use cases: (1) When the app is first installed and I want to seed with some pre-loaded data, or (2) if a pre-existing customer downloads the iCloud update, and their existing data should be uploaded to the iCloud. In each of these cases, I will have a "seed store" in the application which I will read from and upload the data to iCloud.</p> <p>The problem is, how do I know if the data has already been seeded? One option is to <em>delete the seed store</em> from the device once seeding is completed, so that the next time the app launches, it will know that it does not need to seed again.</p> <p>But, what if the store was already seeded from a different device? Is there some sort of flag I can check in iCloud which will tell me that the data should not be seeded? Or, am I forced to <em>always</em> seed the data when the local seed store is extant, and then de-dupe? That will cause problems because the initial seed data (from the app's initial launch after installation) is user-deletable, and so if they (1) install the app on their iPhone, and then delete the default data set, and then (2) install the app on their iPad, then the default data set will be re-uploaded <em>again</em>.</p> <p>Another option that just occurred to me is that when the user installs the app, or turns on iCloud, I could ask the user: Have you already uploaded data? Do you want to replace any data in iCloud with the local data? And if they say yes, then it will nuke iCloud's data store and then re-seed with local data. The problem with this, however, is that it creates the possibility of user error—and this is something that I don't want users to screw up.</p> <p>Any thoughts?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload