iphone - iOS 7 - didUpdateLocations delegate not called after app goes in background -
i'm able receive location updates on (simulators , ipad device) iphone device.
self.locationmanager = [[[cllocationmanager alloc] init] autorelease]; self.locationmanager.desiredaccuracy = kcllocationaccuracybestfornavigation; self.locationmanager.pauseslocationupdatesautomatically = no; self.locationmanager.delegate = self; - (void)locationmanager:(cllocationmanager *)manager didupdatelocations:(nsarray *)locations { cllocation *newlocation = locations.lastobject; nslog(@"didupdatelocations newlocation = %@", newlocation); . . } i receive didupdatelocations (nslog message) long app in foreground after press home button (i.e. app goes in background), stop receiving notifications in didupdatelocations. 'console' doesn't show nslog message , thereafter location icon in status bar goes away within 10 seconds.
what works doesn't -
appears ios 6 installed on other iphone 3gs works fine. little location icon doesn't go away.
test on ipad device ios 7 , app keeps running in background.
all simulators (iphone , ipad) ios 6 ios 7 works expected.
when test on iphone 4 ios 7, app doesn't run in background. probably, issue on ios 7 (and specific iphone devices).
i think found cause of problem. "settings" app in ios 7 has general > "background app refresh" turned off :( turned "on", app started running in background :)
Comments
Post a Comment