Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import HealthKit
  2.  
  3. class HealthKitManager {
  4.  
  5. class var sharedInstance: HealthKitManager {
  6. struct Singleton {
  7. static let instance = HealthKitManager()
  8. }
  9.  
  10. return Singleton.instance
  11. }
  12.  
  13. let healthStore: HKHealthStore? = {
  14. if HKHealthStore.isHealthDataAvailable() {
  15. return HKHealthStore()
  16. } else {
  17. return nil
  18. }
  19. }()
  20.  
  21. let stepsCount = HKQuantityType.quantityType(forIdentifier: HKQuantityTypeIdentifier.stepCount)
  22.  
  23. let stepsUnit = HKUnit.count()
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement