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 @@
- (void) getStationaryLocation:(CDVInvokedUrlCommand *)command;
- (void) onSuspend:(NSNotification *)notification;
- (void) onResume:(NSNotification *)notification;
- (void) onAppTerminiate:(NSNotification*)notification;
- (void) onAppTerminate;
@end
......@@ -402,11 +402,21 @@
/**@
* Termination. Checks to see if it should turn off
*/
-(void) onAppTerminiate:(NSNotification *) notification
-(void) onAppTerminate
{
NSLog(@"- CDVBackgroundGeoLocation terminate");
if (isUpdatingLocation && stopOnTerminate) {
NSLog(@"- CDVBackgroundGeoLocation appTerminate");
if (enabled && stopOnTerminate) {
NSLog(@"- CDVBackgroundGeoLocation stoping on terminate");
enabled = NO;
isMoving = NO;
[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