Posts

Post not yet marked as solved
0 Replies
133 Views
Hello, im having trouble making my code work and i keep running into the following error, i dont know how to fix my problem: Cannot convert value of type 'Set<HKQuantityType?>' to expected argument type 'Set<HKObjectType>' func healthPermission(){    if #available(iOS 15.0, *) {      let healthKitRead : Set<HKObjectType> = [       HKObjectType.quantityType(forIdentifier: .walkingAsymmetryPercentage)!,       HKObjectType.quantityType(forIdentifier: .appleWalkingSteadiness)!,      ]      if !HKHealthStore.isHealthDataAvailable() {        print("permission fail")        return      }      healthStore.requestAuthorization(toShare: [], read: healthKitRead)      { (success, error) -> Void in        print("Permission sucess")      }    } else {      // Fallback on earlier versions    }       } Thanks for any help or advice.
Posted
by punchy.
Last updated
.
Post not yet marked as solved
0 Replies
128 Views
The linked article explains the walking steadiness. https://support.apple.com/en-us/HT212503 I was wondering if i can read this data myself, track it myself and save it myself in my own app. Or if this algorithm and data is locked and unaccessable. Thank you for any help.
Posted
by punchy.
Last updated
.