healthkit Questions
1
HKObserverQuery has the following method that supports receiving updates in the background:
- initWithSampleType:predicate:updateHandler:
The updateHandler has a completionHandler which has the ...
Bubble asked 9/5, 2015 at 17:57
2
I need to make an app that records heart rate data in near real time and send this data to a server as soon as possible.
First I took this approach: Watch os 2.0 beta: access heart beat rate
In f...
3
Solved
I want to check if HeathKit has been authorized for me to read the user's data, if I'm authorized segue to the workouts, if not pop an alert. But requestAuthorizationToShareTypes always seems to re...
1
Solved
Using HealthKit, I am saving below data:
Workout
Active Energy
Distance
I am deleting workout using below code:
self.healthStore?.delete(workout, withCompletion: { (status, error) in
But abo...
Wolfort asked 9/5, 2019 at 8:55
1
I want let users view the Weight section of Apple's Health app to allow them to see detailed data, etc. I manage to open the Health app via the URL scheme x-apple-health://, but I would like to sen...
2
Solved
I have created a session in Watch and updating Heart Rate Data in Health Kit. Now, I want to Display the current Heart Rate in my iPhone Screen. Watch sensor update the Heart Rate Data in Health ki...
Spoonbill asked 14/12, 2018 at 13:36
2
Solved
This happens very rarely. Here is the last line of the stack trace:
0 libdispatch.dylib 0x0000000197a85a9c dispatch_group_leave + 48
dispatch_group_leave is called in a complete closure which is...
6
Solved
I am making a swift iOS app that integrates with a user's step count as reported by the Health app. I can easily find the user's step count in the last hour, using this as my predicate:
let anHour...
2
Solved
I am building an app and retrieving a users step count from HealthKit
There is no error, and I was curious to see if when you run code on xcode using the simulator the step count will always be 0...
2
Solved
I'm building an app for personal use, and I am currently stuck on how to accurately get yesterdays steps from the healthkit. And then from there, placing it into a variable (should be easy, I know)...
Parabasis asked 23/9, 2016 at 5:48
1
Solved
I am using HKLiveWorkoutBuilder & HKWorkoutRouteBuilder to track a workout on Apple Watch.
when calling:
[workoutBuilder finishWorkoutWithCompletion:^(HKWorkout * _Nullable workout, NSError *...
2
Solved
Hi I'm writing a Fitness App which gets its Data from Apples Health app.
So far so good.
Problem: in Health app it is possible to make manually data entries which makes it possible to cheat.
Que...
4
Solved
I have an universal app and I´ve implemented it to use the healthkit API. It runs great on iPhone but when I try to install it on an actual iPad device (works perfectly in iPad simulator) it wont i...
0
I'm testing out my code that starts an HKWorkoutSession collects samples and ends then saves the workout using the old HKWorkoutConfiguration API (not the new HKWorkoutBuilder API)....my understand...
Saberio asked 8/8, 2018 at 14:56
2
Solved
Apple health app gives the data by Date wise as shown in below image.
By using HealthKit i am fetching the steps data from apple health
as
let p1 = HKQuery.predicateForSamples(withStart: fromD...
Hypochondriasis asked 31/5, 2018 at 9:6
1
Solved
Can we link directly to Sources then my app? I tried to open an URL like x-apple-health://sources/MyApp but it only open Sources and not goes directly to MyApp. Anyone knows if that's even possible...
1
Solved
The following chart lists my step data from HealthKit vs. the CMPedomoter class:
HealthKit CMPedometer difference
1 2710 2681 -29
2 2569 2580 11
3 2367 2312 -55
4 1326 1311 -15
5 2728 2711 -17
6...
1
Solved
EDIT to add my updated code which I based on WWDC 2016's Getting the Most Out of Healthkit talk, but I still am not getting my print statement with the new workout to fire unless I open the app?
...
Dearing asked 2/4, 2018 at 16:5
5
I'm using the following Swift code.
let sampleType : HKSampleType = HKSampleType.quantityTypeForIdentifier(HKQuantityTypeIdentifierHeartRate)
let nowDate: NSDate = NSDate()
var calendar: NSCalenda...
Selfoperating asked 10/9, 2015 at 4:50
1
Solved
This is a WatchOS App. Through testing, it appears as though this code will only return any bodyweight values that I manually add to the health app that are less than 1 week old. Is this intended? ...
Crofton asked 10/2, 2018 at 5:35
3
How to use : HKUnit
Sample type Unit type Unit name Unit string
Heart Rate count/time Beats per Minute "count/min”
5
Solved
Blood glucose values were added back in Health in iOS 8.2: https://support.apple.com/en-us/HT203113
How do I construct a HealthKit HKUnit for mmol/L (millimoles per liter) for Blood Glucose values...
Beatty asked 11/5, 2015 at 21:11
2
Solved
Is there a way of emulating a workout on the Apple watch sim? It would be really useful to test workout apps, health monitors, etc.. I am running Xcode 7 beta and I can't find an option for it. I s...
Glooming asked 7/7, 2015 at 12:22
1
Solved
I am writing an app in Swift 4 that uses Apple's HealthKit. I am trying to write to the "VO2 Max" metric, but I am not sure which unit to use. In the Health App itself, the unit is listed as "mL/(k...
6
Solved
What's the best way to get a total step count for every day recorded in HealthKit.
With HKSampleQuery's method initWithSampleType (see below) I can set a start and end date for the query using NSPr...
Coacervate asked 11/4, 2015 at 20:4
© 2022 - 2024 — McMap. All rights reserved.