Post not yet marked as solved
I'm trying to request access to read/write from HealthKit but am un able to figure out how to solve this error. When I attempt to put in "NSHealthUpdateUsageDescription" to my Info.plist file I get the Privacy - "Update Usage Description" equivalent, but still get this error.
I'm working with some code based on WWDC20 10664.
Post not yet marked as solved
I want to build the iOS app at the same time as the watch application, is there a way do this?
Currently to build/run either application I have to go to Product > Scheme > iOS or select WatchKit App. As far as I know I am not able to have both of these options selected at the same time. Is there a way to do this?
I eventually want to run these apps in "parallel" so that I might read information from my watch and display it on the iOS application.
Post not yet marked as solved
I am trying to display the steps of a user to a metrics view screen in an apple watch.
Here is how I try to get the steps:
KQuantityType.quantityType(forIdentifier: .stepCount):
let stepCount = HKUnit.meter()
self.stepCount = statistics.sumQuantity()?.doubleValue(for: stepCount) ?? 0
print("step count: \(self.stepCount ?? 0)")
Where stepCount is a published variable.
I then try to display the steps:
Text("\(workoutManager.stepCount!) steps")
I am not able to see the steps in a log when I try to print or through Text....any ideas on how to do this?