CoreData UIManagedDocument saving/closing questions
CoreData UIManagedDocument saving/closing questions
- Subject: CoreData UIManagedDocument saving/closing questions
- From: email@hidden
- Date: Tue, 28 Aug 2012 22:17:59 -0400
This is on iOS 5 and higher.
I have an iOS app that can open separate data files (one open at a time) using a UIManagedDocument subclass.
When I do a -saveToURL:forSaveOperation:completionHandler
do I need to that inside a:
[[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:
block in case the application enters the background and will be terminated before the save operation completes? Or does UIManagedDocument take care of that for me?
Also, my app delegate's
- (void)applicationDidEnterBackground:(UIApplication *)application
do I need to call:
- (void)closeWithCompletionHandler:(void (^)(BOOL success))completionHandler
and then reopen it in:
- (void)applicationWillEnterForeground:(UIApplication *)application
Or can I just call:
-saveToURL:forSaveOperation:completionHandler
in
- (void)applicationDidEnterBackground:(UIApplication *)application
without worrying about closing the file if the app is later terminated?
Thanks,
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden