Last active
September 14, 2018 17:28
-
-
Save nderkach/6b13acc236159254156bbfa7c2ccaa6e to your computer and use it in GitHub Desktop.
Authorize HealthKit
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
let healthKitManager = HealthKitManager() | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
// Override point for customization after application launch. | |
healthKitManager.requestAccessWithCompletion() { success, error in | |
if success{ print("HealthKit access granted") } | |
else { print("Error requesting access to HealthKit: \(error!)") } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment