Questions tagged [healthkit]

HealthKit is a framework for iOS and watchOS that allows health and fitness services to share their data with the new Health app and with each other.

HealthKit allows apps that provide health and fitness services to share their data with the new Health app and with each other. A user’s health information is stored in a centralized and secure location and the user decides which data should be shared with your app.

HealthKit also works directly with health and fitness devices. In iOS 8.0, the system can automatically save data from compatible Bluetooth LE heart rate monitors directly into the HealthKit store. The system can also automatically import step count data from the M7 motion coprocessor, if available. Other devices and data sources must have a companion app that can access the data and save it to HealthKit for them.

Quick Reference:

1188 questions
66
votes
1 answer

iOS : Use of HKObserverQuery's background update completionHandler

HKObserverQuery has the following method that supports receiving updates in the background: - initWithSampleType:predicate:updateHandler: The updateHandler has a completionHandler which has the following documentation: This block is passed to the…
ospr
  • 1,650
  • 2
  • 17
  • 21
44
votes
3 answers

Healthkit background delivery when app is not running

Can HealthKit background delivery launch the application if is not running? Particularly in a terminated state?
Ujjwal Khatri
  • 716
  • 1
  • 6
  • 19
37
votes
6 answers

HealthKit Swift getting today's steps

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 anHourBeforeNow: NSDate =…
owlswipe
  • 19,159
  • 9
  • 37
  • 82
30
votes
4 answers

iOS universal app with healthkit won't run on iPad

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 install. I am getting the error message: "The…
Philip
  • 2,287
  • 1
  • 22
  • 37
27
votes
2 answers

iOS get heart rate from Apple Watch in near real time

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 fact it is working fine. There is new heart rate data…
user2529173
  • 1,884
  • 6
  • 30
  • 43
26
votes
3 answers

How to Check if HealthKit has been authorized

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 return true? How can I get a reference to whether the…
GarySabo
  • 5,806
  • 5
  • 49
  • 124
20
votes
2 answers

HealthKit HKAuthorizationStatus for reading data

I'm using HealthKit to read certain types of information. I'm specifically not asking for write functionality. The problem comes in when trying to detect if the user has allowed a certain Health type to be read. I believe the intended way to do…
Sean
  • 1,045
  • 7
  • 22
19
votes
7 answers

iOS 8.0.2 Library Not Loaded libswiftCore.dylib

I have an application that uses HealthKit and Swift in it, everything compiles and runs fine when I test it from Xcode on a simulator or a device. I tested, debugged it, and submitted it to the iTunes store. When the application was approved I…
AgnosticDev
  • 1,843
  • 2
  • 20
  • 36
18
votes
2 answers

dispatch_group_leave crash in swift

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 invoked like this: …
jestro
  • 2,524
  • 4
  • 27
  • 46
17
votes
6 answers

App Store Connect Operation Error: ITMS-90164 [] for key com.apple.developer.healthkit.access

I am now getting this error when trying to upload to the app store, but I haven't made any changes to my healthkit capability and it everything looks fine (see images). Why is it saying the value is [] < ?xml version="1.0"…
GarySabo
  • 5,806
  • 5
  • 49
  • 124
16
votes
0 answers

How to get WatchOS4 heartRateVariabilitySDNN and it's use?

I am trying to use heartRateVariabilitySDNN. I successfully get heartRate by query and I use the following code for getting heartRateVariabilitySDNN but have no idea how it works. Also there is no proper documentation about this query or sample code…
Nitin Gohel
  • 49,482
  • 17
  • 105
  • 144
16
votes
2 answers

Ignore manual entries from Apple Health app as Data Source

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. Question: how can i exclude or ignore this specific Data…
Jopi
  • 163
  • 1
  • 4
16
votes
3 answers

Open HealthKit App from another app

I want to build a fitness app that will upload the data to HealthKit. Is there any way to open/navigate to HealthKit from another app?
Pangeran Bottor
  • 408
  • 3
  • 13
15
votes
6 answers

Why am I getting the error plugin_not_installed with the Ionic Framework plugin healthkit?

I have been using Ionic Framework for a while but I have recently come across this error plugin_not_installed for the Health Kit plugin which I know I have based on my ionic cordova plugin list output. $ ionic cordova plugin list > cordova plugin…
arodebaugh
  • 538
  • 1
  • 8
  • 26
15
votes
2 answers

HealthKit (iOS) won't deliver data in background (objC)

We're currently trying to get HealthKit to work in the background, in order to deliver steps data to our server when the App is closed. For experimental purposes we've created a brand new iOS project in XCode, enabled HealhtKit and all background…
Oakleaf
  • 393
  • 3
  • 14
1
2 3
79 80