Database Reference
In-Depth Information
-(void)persistentStoreUpdated:(NSNotification *)notification {
if(_closeFriend == nil)
[_delegate detailViewControllerDidClose:self];
else
[self configureView];
}
In the first method we simply call our delegate method. This will ultimately pop this view controller
off the stack.
In the second method we check to see whether our managed object has been deleted by iCloud.
If it has, we call our delegate method. If it has not, we update our view by calling our configureView
method.
That's it. You are now ready to take your friendly app completely to the cloud. Add a few close
friends and then delete the app. Watch them return almost instantly. Try logging in with a different
iCloud account to see how the application reacts to the account change.
Summary
In this chapter we learned the basics of integrating iCloud with Core Data. We learned several of
Core Data's newer features including automatic validation of property values and schema migration.
Remember, you can learn more about these features by visiting http://developer.apple.com . We
also discussed the Fallback Store and how Apple has recently assumed responsibility of it so that
developers no longer need to manage multiple stores, and how this has led to an asynchronous
process versus the previous synchronous one.
Finally, we added Close Friends to our Friend app, allowing us to view birthdays of our friends. We
then added iCloud to Core Data, completing our first app integrated with iCloud!
 
Search WWH ::




Custom Search