Can the healthkit data leave the iOS device? - ios

Am creating a health related app.
Using healthkit, i can access user health information.
But can i extract the lab data and process it on the server side?
Can we send iOS healthkit data through api server and process data on server side?

I found this thread, some responses from Apple's team
"The short answer is no. The nature of health information is very personal, so we want to keep it as private as possible. This is taken from the HealthKit Framework Documentation:
"The HealthKit data is only kept locally on the user’s device. For security, the HealthKit store is encrypted when the device is not unlocked. The HealthKit store can only be accessed by an authorized app. You cannot access HealthKit from extensions (like the Today view) or from a WatchKit app."
Here's a link to the rest of the documentation, I recommend reading through the HealthKit and Privacy section for some more detail.
Hope that Helps!"
Reference: https://developer.apple.com/forums/thread/11860

Related

Can data of third-party apps synced to Apple Health be retreived via HealthKit

I am researching the feasibility of an iOS app that can collect data from multiple brands of wearable devices. I am only interested in devices that have apps that are able to sync with Apple Health. Does Apple Health uses HealthKit store to store the data it synced from third-party apps so that I can access it from my iOS app?
Any third-party app can save data to Apple Health using the HealthKit APIs, but it's also possible for an app to ignore HealthKit entirely and keep their wearable device data in their own proprietary system. Apple doesn't automatically ingest all third-party health/wearable data into HealthKit.
It's up to the third-party apps to save their data to HealthKit (and for the user to grant permission to these apps to save the data). Your own iOS app will be able to fetch any data that other apps do save to HealthKit (again, assuming the user grants your own app permission to read data). Each HealthKit sample contains a sourceRevision property that describes the app/device that generated the sample, and you can display that information to your user, filter your queries by that source, etc.

How does HealthKit actually share data?

On the Apple's HealthKit Framework official site it says that
"The HealthKit data is not saved to iCloud or synced across multiple devices. The data is only kept locally on the user’s device."
If it's stored locally and never synced with a cloud then it means that I cannot share it with other users. But then Apple says that it's possible to share your data with your doctors as Epic and Mayo clinic are Apple's partners. How is this possible?
And also, how does the data come from wearable devices to the phone?
It's very confusing.
I would be grateful if anyone could explain that because Apple and others basically say the same things and no one explains how that really works.
HealthKit is a data repository that apps from the App Store use to share health data. The user may choose to authorize an app to read or write HealthKit data. For example, an app from Withings can write weight measurements from its wireless scale to HealthKit and then Strava may read those weight measurements to keep your profile on their site up-to-date. This is how apps share data using HealthKit.

Health Kit reading permission

I have a app which writes active calories data to health kit. To prevent duplication of data writing in health kit i read health kit active calories to check if one instance already exsists.
I was under the impression that to read active calories from health kit we need to ask user permission to read active calories.
But after some testing i have observed that i am able to read the active calories data from health kit without getting the user permission.
Is this normal behaviour, that i am able to read data from health kit without the user permission beacuse i have written it?
Should i continue with this implementation or is this a bug?
Found the answer in deep hidden documentation of health kit.
If your app is given share permission but not read permission, you see only the data that your app has written to the store. Data from other sources remains hidden.
If your app has permission to read a data type, you can query that data from the HealthKit store; however, even knowing that the user has denied your request to read data could reveal private health information. Therefore, your app cannot determine whether it has permission to read a particular type of data. If the user does not grant permission, queries for the restricted data types return only the samples that your app has shared. Otherwise, the HealthKit store appears to be empty.
So its not a bug.We can read data written by us in health kit.
Apple's documentation says:
Because health data can be sensitive, HealthKit grants users control over their data by providing fine-grained control over the information that apps can share. The user must explicitly grant each app permission to read and write data to the HealthKit store. Users can grant or deny permission separately for each type of data. For example, a user could let your app read the step count data but prevent it from reading the blood glucose level. To prevent possible information leaks, an app does not know whether it has been denied permission to read data. From the app’s point of view, if the app has been denied permission to read data, no data of that type exists.
If you are able to read actual items from the store and you are sure that you haven't already allowed a previous version of the application the right access (check Settings), this sounds like a bug that should be reported to Apple.

IOS MDM Device Tracking is it possible?

Hi could any one please answer to my questions.
1)Can we do device tracking using IOS MDM?
2)Many of forums are showing that an application which has device tracking functionality,Apple rejects the application.
Any answer would be appriciated.
Thanks in advance.
App Store Guidelines:
17.1 Apps cannot transmit data about a user without obtaining the user's prior permission and providing the user with access to
information about how and where the data will be used
4.1 Apps that do not notify and obtain user consent before collecting, transmitting, or using location data will be rejected
4.2 Apps that use location-based APIs for automatic or autonomous control of vehicles, aircraft, or other devices will be rejected
4.3 Apps that use location-based APIs for dispatch, fleet management, or emergency services will be rejected
4.4 Location data can only be used when directly relevant to the features and services provided by the App to the user or to support
approved advertising uses
There may be more that affect you: https://developer.apple.com/appstore/resources/approval/guidelines.html

iOS: What restrictions are there on data gathering from within an app?

I have an app that I did as a proof of concept and put on the app store just to gain experience going through the process but it turns out, it gets quite a few downloads, probably 30 a week. No Angry Birds but the app is very specific on the data it provides. It's a free app and what I would like to do now is gather some data on the users - how often they use it, where they are, what information they are searching and saving. I have no intention of touching personal data but I'd like to be able to aggregate what all the users are doing and see if there's any value in that.
Is this permitted in an iOS app? I see reports where apps are gathering more data than that (like Path pulling all your contacts) and I would think what I am looking to do is pretty standard.
Any advice is appreciated.
Check the App Store approval guidelines. That is the best resource you have.
https://developer.apple.com/appstore/resources/approval/guidelines.html
A few excerpts that may be relevant to you:
Location
4.1 Apps that do not notify and obtain user consent before collecting, transmitting, or using location data will be rejected
4.2 Apps that use location-based APIs for automatic or autonomous control of vehicles, aircraft, or other devices will be rejected
4.3 Apps that use location-based APIs for dispatch, fleet management, or emergency services will be rejected
4.4 Location data can only be used when directly relevant to the features and services provided by the App to the user or to support
approved advertising uses
Privacy
17.1 Apps cannot transmit data about a user without obtaining the user's prior permission and providing the user with access to
information about how and where the data will be used
17.2 Apps that require users to share personal information, such as email address and date of birth, in order to function will be rejected
17.3 Apps that target minors for data collection will be rejected
Independent of what the guideline says, you should be mindful of your users privacy. As long as you don't pin the information you collect to individual users, I guess you might be fine.
Regarding location data, the guideline states you can't collect for analytical purposes if it is not relevant to the app's usage. However, it is referring to the gps data. You can obtain location for analytical purposes through network access information.

Resources