Questions tagged [applehealth]
22 questions
3
votes
1 answer
HealthKit single workout location
Workouts recorded by Apple Workouts app on Apple Watch assign a location to stationary workouts, which is displayed as a pin in the Apple Fitness app.
This does not seem to be a HKWorkoutRoute (displayed as a route heatmap in Apple Fitness), which…

Empty2k12
- 475
- 12
- 34
2
votes
1 answer
HealthKit Error: “Failed to find some objects for deletion” when attempting to delete HKQuantitySample
I have a workout Apple Watch app that starts an HKWorkout and saves HKQuantitySamples (DistanceWalkingRunning samples) into Apple Health using the original Healthkit API (not the newer workout builder). I then want to give the user the ability to…

GarySabo
- 5,806
- 5
- 49
- 124
1
vote
0 answers
iOS AppleHealth - Push data with or without taking care of what is already stored
We have an app that tracks steps, distance, calories ... Now we want to push the data into Apple Health. The iPhone is tracking data by itself so I'm wondering if I should simply push the data we measured (which will be added to the existing data)…

Sven
- 37
- 1
- 4
1
vote
0 answers
HealthKit: Send data from Bluetooth LE heart rate monitor to healthkit when app is closed
I am working with a BLE peripheral that tracks heart rate. I can sync the data to HealthKit when the app is running and it is working fine.
I would like to send the heart rate to HealthKit without user opening the app. It is mentioned in the…

Shemona Puri
- 803
- 7
- 12
1
vote
1 answer
how to fetch monthly steps data from google fit using health package flutter
Im writing a flutter program to receive the data from the google fit using the Health package,Im able to fetch weekly data as
weeklyStepData = await health.getTotalStepsInInterval(
now.subtract(const Duration(days: 7)), now);
But…

F sam
- 51
- 7
1
vote
1 answer
Apple Health (HealthKit) Request
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…

Laura Ramírez
- 87
- 6
1
vote
1 answer
Change background colour between day and night in ggplot2 in R
I'm plotting graphs in R from blood pressure measurements stored in Apple's Apple health app following the fantastic blog from Taras Kaduk.
I changed the code for my needs and now I would like to change the background colours from the plot depending…

geom
- 403
- 1
- 3
- 17
1
vote
0 answers
HKSourceQuery not returning values when using with predicateForWorkouts
I am trying to load all sources for cycling workouts. For this, I am using a HKSourceQuery like in the following code block:
let workoutPredicate = HKQuery.predicateForWorkouts(with: .cycling)
let query = HKSourceQuery(sampleType: .workoutType(),…

Empty2k12
- 475
- 12
- 34
0
votes
0 answers
Apple HealthKit Sync Issue
The main issue is with my apple sync. Can't get it to match the data coming in from apple health day by day. If I don't log into the app for a few days when it syncs it deposits all the data on the current day, and not the correct day.

Anish Kumar
- 101
- 2
0
votes
1 answer
Python Skript to Read/Write Google Fit Data via REST API
I recently switch from an iOS Phone to Android. Now I have the problem that all my Apple Health data is not available on my new phone, because Google Fit only imports the 3 last days and all my history.
I exported my Apple Health data to and…

SiSchi
- 1
0
votes
0 answers
Does apple healthkit queries run asynchronously?
Does the apple healthkit queries like HKStatisticsQuery, HKSampleQuery and HKStatisticsCollectionQuery run asynchronously or do we need to explicitly run the queries in a separate thread ?
I just wrote the queries using any async way as follows and…

Krishan Madushanka
- 319
- 1
- 5
- 21
0
votes
1 answer
Swift : Publishing data from one class to another not working (Apple HealthKit)
class HealthKitQueryBuilder
import Foundation
import HealthKit
class HealthKitQueryBuilder:ObservableObject {
let healthStore: HKHealthStore
let dateFormatter = DateFormatter()
@Published var hourlyStpCount: [HealthData]?
…

Krishan Madushanka
- 319
- 1
- 5
- 21
0
votes
0 answers
Could not typecast HKSample into HKClinicalRecord while retrieving Healthkit data and Clinical records
I'm trying to fetch clinical records and apple healthkit data from a flutter application. Since there is no package available for fetching clinical records, I wrote some native code for it by following Accessing Health Records.
The "Query for Health…

Shubham Gupta
- 13
- 3
0
votes
1 answer
How to read algorithm version used to generate an ECG reading in apple health kit?
I am integrating apple healthkit with one of my app and I wonder how to get the algorithm version used to generate an ECG reading in apple health kit.To get ECG reading I use following code
private func readECG(){
let predicate =…

Krishan Madushanka
- 319
- 1
- 5
- 21
0
votes
0 answers
Health package in flutter returns empty list for HealthDataType SLEEP_IN_BED
Im using health: ^4.1.1 package for my project.Im able to add data for the health datatype SLEEP_IN_BED.but when fetching its returning empty list
final time = now.subtract(const Duration(days: 1));
success &= await health.writeHealthData(
…

F sam
- 51
- 7