Post not yet marked as solved
can you please guide can we add pause or sync button in our app for apple healthkit data synchronization, basically we are using long running queries for syncing new apple health data to our app and we want to give user option to pause syncing data any time.
Post not yet marked as solved
Can Apple Watch provide complete data on the heartbeat for thousands of seconds during the workout or when using the "Breathe" app?
When I exported data from Apple Health it shows the following data. The rows 195, 196 & 197 are measurements taken through the "Breathe" app.
Thank you for your answers,
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?
Post not yet marked as solved
So the documentation here only says:
A quantity sample type that measures the standard deviation of heartbeat intervals.
And below:
Discussion
These samples use time units (described in HKUnit) and measure discrete values (described in HKStatisticsQuery).
HealthKit calculates the Heart rate variability (HRV) by measuring the variation between individual heartbeats. While there are multiple ways of computing HRV, HealthKit uses SDNN heart rate variability, which uses the standard deviation of the inter-beat (RR) intervals between normal heartbeats (typically measured in milliseconds).
There is no details on how many heartbeat intervals are used to calculate the SDNN and how to modify it.
What if I want to calculate the SDNN on the last 30 intervals? Or the last 10? or the last 100? Or maybe I just want to calculate it on a timeframe, like 60 seconds, regardless of there were 50 or 120 heartbeats.
Post not yet marked as solved
Hi,
do you know if any data from AW Workout app are actually written to HealthKit only after the workout is over ?
I was wondering how I can read the data (route gps coordinates, specifically) while the workout session is still ongoing.
Thanks!
I am making an app that collects information from Apple Health
(HealthKit). When the application is installed for the first time, the
apple screen appears with the permissions that will be used, but when it
is in Testflight that screen never appears, is there any extra
configuration that has to be done when it is released to production?
if the app is installed from xcode, it works correctly
Post not yet marked as solved
I want to detect when the user has removed the watch from wrist in the middle of a work out. in iOS devices using the HealthKit framework. Been checking the docs, no luck so far.
HealthKit
Post not yet marked as solved
hi is or does anyone want to team up with a group of nurses and doctors to build apps
Post not yet marked as solved
Is there a way to get a human readable description of a HKQuantityTypeIdentifier, that also respects the systems language? So eg
HKQuantityTypeIdentifier.heartRate.humanReadable() = "Heart Rate" on an english phone, and
HKQuantityTypeIdentifier.heartRate.humanReadable() = "Puls" on a german phone etc?
Post not yet marked as solved
I I'm implementing six month sleep analysis data for graph. I have 2 entries as shown in below screenshot. I'm not able to understand logic used to display this data in Six month mode graph in HealthKit. How sleep start time 10:22 PM and sleep end time 7:24 AM is calculated?
Graph in Six Month Mode.
Post not yet marked as solved
Hi, I have a problem with HealthKit. When fetching sleepAnalysis, instead of getting a record for every night, I get multiple records for each night. How can I calculate the total amount of time for every day from the startDate and the endDate of every record? Thanks.
Post not yet marked as solved
Activating the 'com.apple.developer.healthkit.background-delivery' entitlement causes a blank screen in the app specific privacy settings.
The problem can be easily reproduced with the WWDC20 sample App: https://developer.apple.com/documentation/healthkit/creating_a_mobility_health_app
Enable com.apple.developer.healthkit.background-delivery entitlement (see screenshot)
Install sample app on device
Open 'Settings' -> 'Privacy' -> 'Health' -> 'SmoothWalker'
Blank screen
I have submitted this as 9711928 in October 2021 (!) but didn't get any response whatsoever from the engineering team.
Has anyone experienced the same problem and can maybe provide a workaround?
Post not yet marked as solved
HealthKit calculates when a user's period is likely to start next. Is there a way to get access to this data in order to display it in an app? I know one can access past data, but it is specifically future predictions that would be the most useful.
Post not yet marked as solved
How do I remove a step data source in the Health app? Some of the devices are out of use now and I'd like to remove them from my Health data, but now it seems I can only drag them to the bottom in the priority list but am not able to remove them completely.
Post not yet marked as solved
Hi,
I am writing workout app for WatchOS and want to add activeEnergyBurned sample whenever user has finished exercise in workout.
But whenever I add sample to builder it returns that it was successfully added but when checking added samples in Health app, it shows that it is always 0 and also sum of samples is also always 0.
Does activeEnergyBurned has some additional requirements because when tried to write basalEnergyBurned it successfully wrote given calories.
Writing sample here:
let energyBurnedType = HKObjectType.quantityType(forIdentifier: .activeEnergyBurned)
if energyBurnedType != nil {
let energyBurned = HKQuantity(unit: HKUnit.largeCalorie(), doubleValue: Double(totalCalories))
let energyBurnedSample = HKQuantitySample(type: energyBurnedType!, quantity: energyBurned, start: self.exerciseStart, end: Date())
builder.add([energyBurnedSample]) { (success, error) in
print(success)
print(error)
}
}
And reading data that always returns 0:
func updateForStatistics(_ statistics: HKStatistics?) {
guard let statistics = statistics else { return }
DispatchQueue.main.async {
switch statistics.quantityType {
case HKQuantityType.quantityType(forIdentifier: .activeEnergyBurned):
let energyUnit = HKUnit.largeCalorie()
let value = statistics.sumQuantity()?.doubleValue(for: energyUnit)
self.activeCalories = Double( round( 1 * value! ) / 1 )
print(value)
return
default:
return
}
}
}
Any ideas on what am I missing?
I checked my workout recordings and I see that samples get added but doesn't affect total active energy shown in Health app:
And here you can see that sample is added:
Post not yet marked as solved
I've designed a new IPhone. I would like to show it to the design team. Please help!
Post not yet marked as solved
Please help me to find out the below error related to health kit. Sometimes before we have start health kit implementation in our application, so we have enable the health kit setting form identifier(bundle ID) but now we don't need health kit so we remove all the configuration and code related to health kit from our application.
We have summited our app on apple store with some other changes but app rejected from the below error.
Guideline 2.5.1 - Performance - Software Requirements
Your app uses the HealthKit or CareKit APIs but does not indicate integration with the Health app in your app description and clearly identify the HealthKit and CareKit functionality in your app's user interface.
Next Steps
To resolve this issue, please revise your app description to specify that your app integrates with the Health app, and clearly identify the HealthKit functionality in app's user interface to avoid confusion.
Post not yet marked as solved
I'm working on an app to be deployed on shared devices in a hospital. The devices are managed by the Apple School Manager MDM solution and don't have an Apple ID associated with them.
My product aims to reduce the amount of overhead / trips down the hall for nurses. I want to measure steps taken before / after deploying our solution.
Will I be able to access HealthKit data without the devices having an associated Apple ID?
I'd build a sample app to test this out, but I don't currently have access to the devices.
Post not yet marked as solved
Hi all i am a newbie and have no experience in this field but do have an idea that will help Apple in the 3rd world countries My idea is as follow (sorry for spelling)if you take the case of the phone and instead of just a coulor you put in a Solar cellpack then the pack can charge the phone while you are outside or inside and depending on how you design it power can be restored to the phone while outside . There is sturdy protection cases available for the phones and if apple brings a new phone out that has this feature in it then the world will wake up.Also no other phone will be so Green .Battry life will also be longer and the end user will benefit from it more .
Post not yet marked as solved
If I use the Apple training app for indoor swim workouts, I can see the distance by each swimming stroke style later in the Fitness app.
However, if I build my own swim app, the distance by stroke style is not listed.
What do I have to add, to have it listed there?
The information are saved correct in the HKWorkoutEvent array in the workout.