Last active
December 17, 2015 16:29
-
-
Save Donohue/5638790 to your computer and use it in GitHub Desktop.
Register for VOIP keep alive handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL ret = [[UIApplication sharedApplication] setKeepAliveTimeout:600 handler:^(void) { | |
if (updating_location) { | |
[location_manager stopUpdatingLocation]; | |
NSLog(@"Keep alive: Stopping location updates"); | |
} | |
else { | |
[location_manager startUpdatingLocation]; | |
NSLog(@"Keep alive: Starting location updates"); | |
} | |
updating_location = !updating_location; | |
}]; | |
if (ret) { | |
NSLog(@"Keep alive handler registered"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment