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 -

  1. appears ios 6 installed on other iphone 3gs works fine. little location icon doesn't go away.

  2. test on ipad device ios 7 , app keeps running in background.

  3. all simulators (iphone , ipad) ios 6 ios 7 works expected.

  4. 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

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -