Can my app fetch HealtKit data from third party devices? For example from Garmin? In HKSource documentation, it seems that user would have to use Garmin app to transfer HealtKit data from his/hers device to iOS device and only then my app could use that data:
devices need a companion app to collect and save the data to
HealthKit.
Or can I write app, that would handle fetching data from 3rd party devices?
tl;dr Can my app get HealthKit data from 3rd party devices
Third party developers can provide import functionality to health app via the normal Health Kit API on iOS.
Some apps scrape or use web API such as Sync Solver exist to get FitBit data from the cloud to the local health app on iOS. Some such as Health Importer are more general. (proper disclosure: I work on this app)
We have an app on the store that is designed specifically for importing arbitrary CSV data into HealthKit / Health.App.
i hope without API you can't do this.
Related
Is there no problem with using simple and cheap trackers to synchronize with the Apple Health App? Will there be any unsafe exchange of data using third-party trackers? I was checking the apple healthkit documentation and can't seem to find anything about the usage of other trackers.
Are there any third party which provide data of apple health kit data using there end points like google fit provide us via rest api's https://developers.google.com/fit/rest/v1/get-started
No, there are not.
And there most likely won't be in the future either. This is an easy conclusion to make given how Health Kit integration works today and how Apple has privacy protocols around Health Data -
Integrating Health Kit in your app allows you to see Health Data only after the user has granted relevant permissions (of course). But the user has to explicitly grant permission for each datatype (HKObjectType) eg sleepAnalysis, blood glucose etc.
Your app with Health Kit integration can only request Health Data while the app is active in the background and the phone is not locked or running in the foreground. So lets say you have background tasks (BGAppRefreshTask or BGProcessingTask) to request Health Data - this won't work if your phone is locked.
Given these behaviours and other restrictions Apple places around the use of HealthKit, I don't see how there is ever (or at least in the near future) going to be a an api to relay this data.
If you absolutely had to it, your best bet would be to write an application on the device that integrates with HealthKit and exports HealthData to your servers. Then explicitly prompt the user to export HealthData from the app every time, and expose an api from your server. Not happening.
If someone gives permission to access their HealthKit data, can my website be able to display their most recent HealthKit data—their steps count for example. In other words, does HealthKit report to the cloud that can be accessed with an API? Or does it need to be an app that accesses the HealthKit data locally?
There is no cloud API, you would have to create an app that reads the HelathKit data and reports it to your backend.
I am trying to export the health data from my iPhone/Apple Watch automatically. I know it is possible to export the data manually by opening the Health app on your iPhone > clicking the user icon > "Export Health Data". However, I would like to do this automatically and periodically to analyze the data (heart rate, steps, etc.) externally in Python. Is this possible at all?
To access any of your health data stored in Apple Health, you need to add the HealthKit framework to your iOS app by enabling HealthKit capabilities in Xcode. By using certain methods you can request permission from your iPhone to read and write data with your app.
To actually get the data you need to access it by using direct method calls, queries, or long-running queries – depending on how you want to retrieve the data and how background retrieval might work.
There is an "Apple Native way" to do that, This link has a comprehensive step-by-step guide (mainly but not exclusively for iOS developers). The drawback is that you can only integrate HealthKit into iOS applications and need to use iOS SDK 8 or higher.
I'm a junior ios developper trying to communicate with the MDM server : air watch.
I found lot of topics talking about getting the data from the MDM server in my app (like Using MDM To Configure An Enterprise App Via NSUserDefaults and https://www.devexpress.com/Support/Center/Question/Details/T224565) but I cannot find any tutorials on how air watch send data to ios app.
Does anybody face the same problem or have links to help me get through ?
Thanks in advance !
This will work: AppConfig
Implementation in iOS is much simpler than Android
I am not sure what data you want to send down to the app, but syncing application data is usually not the domain of an MDM/EMM solution. I would use either use Apple APNS to publish to the app (directly or through a 3rd party provider) or use periodic polling initiated from your app to fetch you data. A common pattern is to publish a small payload to the app (e.g key-oriented data) and then let it fetch the real application payload using the Apple networking stack
If you use APNS and your enterprise is averse to opening your network to the internet (very common), consider a 3rd party provider like UrbanAirship, Azure,... They handle the initial token handshake as well as provide nice group messaging and other features. Good luck.