Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import HealthKit
- class HealthKitManager {
- class var sharedInstance: HealthKitManager {
- struct Singleton {
- static let instance = HealthKitManager()
- }
- return Singleton.instance
- }
- let healthStore: HKHealthStore? = {
- if HKHealthStore.isHealthDataAvailable() {
- return HKHealthStore()
- } else {
- return nil
- }
- }()
- let stepsCount = HKQuantityType.quantityType(forIdentifier: HKQuantityTypeIdentifier.stepCount)
- let stepsUnit = HKUnit.count()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement