I am trying to choose the best aproach for my iCloud-enabled CoreData app.
I think a good strategy is to create a SingleTon class to handle all CoreData and iCloud materials and deliver the ManagedObjectContext to the application.
This class should handle the case of a user changing an iCloud account or the case of iCloud is disabled. To do this, I need to work with several NSPesistentStores, one for iCloud, and one for iCloud is not available, and transfer data between them when necessary. is not it?
My main question is: what are the advantages and disadvantages of using the UIManagedDocument class or the traditional CoreData stack to create a singleton class that handles the core logic of the CoreData / iCloud application?
Can the sample code from WWDC 2012 also work with UIManagedDocument installed in the standard CoreData stack?
source share