Commit 98b8fc25 authored by Chris Scott's avatar Chris Scott

Remove dispatch_async stuff in ending bgTask

parent 13d8b881
......@@ -80,10 +80,11 @@
*/
- (void) start:(CDVInvokedUrlCommand*)command
{
NSLog(@"- CDVBackgroundGeoLocation start");
enabled = YES;
UIApplicationState state = [[UIApplication sharedApplication] applicationState];
NSLog(@"- CDVBackgroundGeoLocation start (background? %d)", state);
if (state == UIApplicationStateBackground) {
[self setPace:isMoving];
}
......@@ -173,9 +174,7 @@
UIApplication *app = [UIApplication sharedApplication];
bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
dispatch_async(dispatch_get_main_queue(), ^{
[self stopBackgroundTask];
});
}];
[self.commandDelegate runInBackground:^{
......
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