HealthKit Swift getting today’s steps

HKStatisticsCollectionQuery is better suited to use when you want to retrieve data over a time span. Use HKStatisticsQuery to just get the steps for a specific date. Swift 5: let healthStore = HKHealthStore() func getTodaysSteps(completion: @escaping (Double) -> Void) { let stepsQuantityType = HKQuantityType.quantityType(forIdentifier: .stepCount)! let now = Date() let startOfDay = Calendar.current.startOfDay(for: now) let … Read more

Healthkit background delivery when app is not running

After a full day of testing, I can confirm that HealthKit background delivery does work in all of the following application states: background: in background and executing code, suspended: in background and not executing code, terminated: force-killed by the user or purged by the system. Keep in mind: part 1 Some HealthKit data types have … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)