ios - My app doesn't release location services -
one of apps not release location services when it's killed user.
symptoms: location services icon appears on phone @ times.
it has "background app refresh" setting on phone far know not use background services.
i use location services in 2 places in app (should deallocating?):
place 1:
locationmanager = [[cllocationmanager alloc] init]; locationmanager.delegate = self; locationmanager.desiredaccuracy = kcllocationaccuracybest; [locationmanager startmonitoringsignificantlocationchanges];
place 2: have mkmapview
in 1 view controller.
you've started monitoring using startmonitoringsignificantlocationchanges
, you'll need stop using stopmonitoringsignificantlocationchanges
.
i listening uiapplicationdidenterbackgroundnotification
, uiapplicationwillterminatenotification
, calling stopmonitoringsignificantlocationchanges
.
Comments
Post a Comment