-1
  1. I want to open iPhone Settings Screen time page inside my iOS App.
  2. When I try to open the 'Screen Time' settings, it takes me to the iPhone's settings screen instead of opening it within my app itself.

I have followed below code -

if let url = URL(string: "App-Prefs:root=SCREEN_TIME") {

        UIApplication.shared.open(url, options: [:], completionHandler: nil)

}
HangarRash
  • 7,314
  • 5
  • 5
  • 32

1 Answers1

2

you need to implement this

Screen Time

Screen Time: prefs:root=SCREEN_TIME
Screen Time ⇾ Downtime: prefs:root=SCREEN_TIME&path=DOWNTIME
Screen Time ⇾ App Limits: prefs:root=SCREEN_TIME&path=APP_LIMITS
Screen Time ⇾ Always Allowed: prefs:root=SCREEN_TIME&path=ALWAYS_ALLOWED

plz check this link (Opening the Settings app from another app)

Chandaboy
  • 1,302
  • 5
  • 10