ios - GPS sign doesn't go away when I kill all apps -
i have app uses gps location. got feedback closing app doesn't stop gps. user complained ios 7.1 saying before ios update app not doing that. since didn't change code, wonder if have in order satisfy ios7.1 needs.
here do:
cllocationmanager *_lm; - (void)mode:(locatormode)mode { nslog(@"location mode: %d", mode); switch (mode) { case lmbackground: [_lm stopupdatinglocation]; [_lm startmonitoringsignificantlocationchanges]; break; default: [_lm stopmonitoringsignificantlocationchanges]; [_lm startupdatinglocation]; break; } } - (void)applicationdidbecomeactive:(uiapplication *)application { [[locator defaultlocator] mode:lmprecise]; } - (void)applicationwillresignactive:(uiapplication *)application { [[locator defaultlocator] mode:lmbackground]; }
here screenshot i've made. notice there no single app running , yet gps sign lit (a little arrow in top right corner).
Comments
Post a Comment