Open Apple Health programmatically

Is it possible to programmatically open the Health application, how can this be done using the Settings application?

If you cannot open the Apple Health permissions app screen directly, can we at least open the Apple Health main screen?

Change I know that I cannot ask for permission again - just like with other things like access to the camera, etc. However, if the user refuses camera permissions, I can directly redirect them to the settings page where they can change these permissions.

NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; [[UIApplication sharedApplication] openURL:url]; 

Is there such a thing for a health app?

+7
source share
3 answers

It seems like with iOS 10+ you can open the Health app.

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

See here for more details.

fooobar.com/questions/548552 / ...

+12
source

Health permissions are only opened automatically once by the system at the time you request HealthKitStore for the correct permissions. If the user refuses permissions, you cannot open them again. You may try to ask for additional permission just to display the screen, but even if that might work, I believe that this is not what Apple intended with default behavior and could threaten your application to crash.

-1
source

There is no API to send a user to the Health app.

-1
source

All Articles