Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open HealthKit App from another app

Tags:

ios8

healthkit

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?

like image 778
Pangeran Bottor Avatar asked Aug 12 '14 08:08

Pangeran Bottor


People also ask

Is Apple Health the same as HealthKit?

HealthKit is the developer framework behind it that allows apps to work with Apple Health and each other. If you're confused about how the Apple Health app works, what type of information you need to get the most out of it, and which apps are compatible, keep reading.

How do I import health data to Health app?

Step 1: Launch the Health app. Step 2: Tap your profile from the top right of either the Today or Health Data tabs. Step 3: Select Export Health Data and confirm the action by tapping Export. Step 4: You will see the export being prepared and once it finishes, your sharing options will appear.

Is HealthKit an app?

The app pulls heart rate, blood pressure, body temperature, weight, nutrition, respiratory rate, and blood glucose in from HealthKit so users can choose to share it with their doctor during a video call.


1 Answers

On iOS 10, the Health app URL scheme is x-apple-health. You can open it from within your own app by calling:

Objective-C:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"x-apple-health://"]];

Swift:

UIApplication.shared.open(URL(string: "x-apple-health://")!)

See Open Health app using url scheme | Apple Developer Forums.

like image 53
Olivier Avatar answered Sep 24 '22 13:09

Olivier