iphone - StartUpdatingLocation Vs significant-change location service -
i having issue regarding significant-change location service.
apple documentation says "whether utilize standard location service or significant-change location service location events, way receive events same."
but in case of "significant-change location service" not able callbacks in case of "standard location service" please allow me know if has inputs?
startupdatinglocation
updates location when called first time , when distance filter value exceeds.
but startmonitoringsignificantlocationchanges
when important alter in position occurs.
please check cllocationmanager details.
startupdatinglocation
starts generation of updates study user’s current location.
- (void)startupdatinglocation discussion
this method returns immediately. calling method causes location manager obtain initial location prepare (which may take several seconds) , notify delegate calling locationmanager:didupdatelocations: method. (in ios 5 , earlier, location manager calls locationmanager:didupdatetolocation:fromlocation: method instead.) after that, receiver generates update events when value in distancefilter property exceeded. updates may delivered in other situations though. example, receiver may send notification if hardware gathers more accurate location reading.
calling method several times in succession not automatically result in new events beingness generated. calling stopupdatinglocation in between, however, cause new initial event sent next time phone call method.
if start service , application suspended, scheme stops delivery of events until application starts running 1 time again (either in foreground or background). if application terminated, delivery of new location events stops altogether. therefore, if application needs receive location events while in background, must include uibackgroundmodes key (with location value) in info.plist file.
in add-on delegate object implementing locationmanager:didupdatelocations: method, should implement locationmanager:didfailwitherror: method respond potential errors.
startmonitoringsignificantlocationchanges
starts generation of updates based on important location changes.
- (void)startmonitoringsignificantlocationchanges discussion
this method initiates delivery of location events asynchronously, returning shortly after phone call it. location events delivered delegate’s locationmanager:didupdatelocations: method. first event delivered cached location event (if any) may newer event in circumstances. obtaining current location prepare may take several additional seconds, sure check timestamps on location events in delegate method.
after returning current location fix, receiver generates update events when important alter in user’s location detected. example, might generate new event when device becomes associated different cell tower. not rely on value in distancefilter property generate events. calling method several times in succession not automatically result in new events beingness generated. calling stopmonitoringsignificantlocationchanges in between, however, cause new initial event sent next time phone call method.
if start service , application subsequently terminated, scheme automatically relaunches application background if new event arrives. in such case, options dictionary passed locationmanager:didupdatelocations: method of application delegate contains key uiapplicationlaunchoptionslocationkey indicate application launched because of location event. upon relaunch, must still configure location manager object , phone call method go on receiving location events. when restart location services, current event delivered delegate immediately. in addition, location property of location manager object populated recent location object before start location services.
in add-on delegate object implementing locationmanager:didupdatelocations: method, should implement locationmanager:didfailwitherror: method respond potential errors.
note: apps can expect notification device moves 500 meters or more previous notification. should not expect notifications more 1 time every 5 minutes. if device able retrieve info network, location manager much more deliver notifications in timely manner.
iphone ios geolocation location cllocationmanager