Last active
October 6, 2017 12:35
-
-
Save Ravi61/802f48de4c0d5e7f75451940113aa862 to your computer and use it in GitHub Desktop.
Code for LocationAppDelegate
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
class LocationAppDelegate: NSObject, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool { | |
// initialize location manager | |
return true | |
} | |
func applicationWillEnterForeground(_ application: UIApplication) { | |
// start tracking | |
} | |
func applicationDidEnterBackground(_ application: UIApplication) { | |
// stop tracking | |
} | |
func applicationDidBecomeActive(_ application: UIApplication) { | |
// some location related code | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment