i am want to use startMonitoringSignificantLocationChanges in my app,but i have some question,i hope get some help:
for a common app if app enter background,after 10mins ,system can kill the app.if i used startMonitoringSignificantLocationChanges ,when i enter background two hours,my app not terminated,because i click the icon,app will enter the last quit page 。if app is killed,when you click the icon you will first see the default page. so my question is use startMonitoringSignificantLocationChanges my app not killed by system after enter background 10 mins?
if i close mobile,and restart the mobile,when significant location change,my app if can be activate ,i look apple develop document it answer yes.so i test:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if([CLLocationManager significantLocationChangeMonitoringAvailable]){ [self log:@"sigAvailable=YES"]; } // Override point for customizatio-n after application launch. id locationValue = [launchOptions objectForKey:UIApplicationLaunchOptionsLocationKey]; if (locationValue) { // create a new manager and start checking for sig changes [self log:@"didFinishLaunchingWithOptions location key"]; m_locManager = [[CLLocationManager alloc] init]; [self log:@"didFinishLaunchingWithOptions created manager"]; m_locManager.delegate = self; [self log:@"didFinishLaunchingWithOptions set delegate"]; [m_locManager startMonitoringSignificantLocationChanges]; [self log:@"didFinishLaunchingWithOptions monitoring sig changes"]; // do send local notification return YES; } [self log:@"didFinishLaunchingWithOptions"]; return YES; }
my question: when restart mobile and local notification,above code is run and log "didFinishLaunchingWithOptions location key" and so on,if i send local notification at the above code, if user will receive?