openSettingsURLString For Privacy & Security -> Health

How can I open the user's Health Privacy Settings directly from my app when I'd like them to review them?

I believe similar questions have been asked before like this one: https://forums.developer.apple.com/forums/thread/730434

However, I'm wondering if the situation is changed for iOS 17 or if there's a way that works for Health permissions.

This is directly possible in the Garmin Connect app for example which is a major app on the store.

Answered by DTS Engineer in 785561022

After a bit of reverse engineering I came up with …

To be clear, this is not a supported technique. See this post for more background.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

I've resolved this. I realised I could use the console and find the URL call the app makes.

After a bit of reverse engineering I came up with this which works on iOS 16.7.2, 17.4.1 & 17.5

UIApplication.shared.open(URL(string: "App-Prefs:Privacy&path=HEALTH")!, completionHandler: { (success) in
            Logger.userevent.info("Settings opened: \(success)")
        })

After a bit of reverse engineering I came up with …

To be clear, this is not a supported technique. See this post for more background.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

openSettingsURLString For Privacy & Security -> Health
 
 
Q