Search code examples
objective-ciosxcode4icloud

iCloud update policy on CoreData in development and production mode


as specified in the subject I am developing un application that made use of CoreData and its built in iCloud feature.

Whenever I connect my devices (an iPad and an iPhone) to xcode and run the application, I can see after few minutes the log of CoreData updating data. In both devices on iCloud section, I can see my application full entitled for iCloud. First question: how often are iCloud content pushed (or pulled) to devices ? Is there a way to force this ?

Second, I noticed that the devices, once disconnected from Xcode, doesn't update their data anymore. While if plugged again and run the app, the data get updated. So the question, is iCloud in development mode (the app is not yet submitted to App Store) working only trough xcode, and if yes why ? Or am I doing something wrong within the objective-c code itself ?

thanks


Solution

  • The updates are getting pushed to iCloud servers whenever you save CoreData moc. The updates are getting pushed from iCloud to device automatically. There's no way to force it as far as I know.

    It can take from seconds to dozens of minutes for an update from iCloud to appear on your device (also depends on your connection speed). Apple doesn't give any guarantees on when it will actually happen.

    I haven't seen any difference in iCloud behavior whether app started fom XCode or not. Check your code and UI updates base on iCloud pushes.