Last active
June 11, 2018 16:19
-
-
Save leogdion/25d0734330f2aa7dd9087020947aa26e to your computer and use it in GitHub Desktop.
Handle AppleWatch Request For Authorization on iPhone
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
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate | |
{ | |
... | |
func applicationShouldRequestHealthAuthorization(_ application: UIApplication) { | |
let healthStore = HKHealthStore() | |
healthStore.handleAuthorizationForExtension { | |
(success, error) -> Void in | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment