Database Reference
In-Depth Information
Fallback Store
The fallback store is a local persistent store available to your app in the event that the iCloud store
was unavailable for a period of time. Until recently, you would add this store to the persistent store
coordinator. This made your fallback store available to the managed object context so that the user
could continue to make changes while the iCloud store was being set up automatically. This worked
great, but there was a downside. If your app interfaced with multiple iCloud accounts, over time you
would end up managing a lot of different persistent stores. Basically, you would manage one fallback
store and one iCloud store for every account.
Apple has since assumed responsibility of the fallback store so that you no longer need to manage
this. You now manage one store, and the API delivers the appropriate store to you. This change also
means that you must store your persistent store in local storage.
Core Data Logging
Now that the API has taken over management of the fallback store, you will receive new events
logged to the console when you are debugging your app. These events will let you know if you are
currently using the fallback store or the iCloud store. Here are the two event logs you will now see
and which store they pertain to (see Figure 6-1 ).
Figure 6-1. iCloud Core Data Log
Using fallback store
Core Data: Ubiquity: peerID:StoreName - Using local storage: 1
Using iCloud store
Core Data: Ubiquity: peerID:StoreName - Using local storage: 0
 
Search WWH ::




Custom Search