Commit 60f1ef01 authored by Mark Pearce's avatar Mark Pearce

fixed typo. added all stop code to terminate callback

parent 797c1a78
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
- (void) getStationaryLocation:(CDVInvokedUrlCommand *)command; - (void) getStationaryLocation:(CDVInvokedUrlCommand *)command;
- (void) onSuspend:(NSNotification *)notification; - (void) onSuspend:(NSNotification *)notification;
- (void) onResume:(NSNotification *)notification; - (void) onResume:(NSNotification *)notification;
- (void) onAppTerminiate:(NSNotification*)notification; - (void) onAppTerminate;
@end @end
...@@ -402,11 +402,21 @@ ...@@ -402,11 +402,21 @@
/**@ /**@
* Termination. Checks to see if it should turn off * Termination. Checks to see if it should turn off
*/ */
-(void) onAppTerminiate:(NSNotification *) notification -(void) onAppTerminate
{ {
NSLog(@"- CDVBackgroundGeoLocation terminate"); NSLog(@"- CDVBackgroundGeoLocation appTerminate");
if (isUpdatingLocation && stopOnTerminate) { if (enabled && stopOnTerminate) {
NSLog(@"- CDVBackgroundGeoLocation stoping on terminate");
enabled = NO;
isMoving = NO;
[self stopUpdatingLocation]; [self stopUpdatingLocation];
[locationManager stopMonitoringSignificantLocationChanges];
if (stationaryRegion != nil) {
[locationManager stopMonitoringForRegion:stationaryRegion];
stationaryRegion = nil;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment