简体   繁体   中英

How to restart sync process when press home button and agin tap application icon on Springboard?

i am developing server - client application. Data sync fro server and stored into local device and display.
Problem is when during the sync time i tap home button and again tap on application icon on springboard. now my application getting crashed . how continue last sync process when i tapped application icon on spring board.(when we press home button all process will stopped).

- (void)applicationDidBecomeActive:(UIApplication *)application;
- (void)applicationWillResignActive:(UIApplication *)application;

You should use above methods of UIApplicationDelegate. It will be called when your application changes its state. Store the necessary information at that time applicationWillResignActive and resume the operations in applicationDidBecomeActive when application becomes active.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM