In my app I'm using [NSURL URLWithString:@"App-Prefs:root=Privacy&path=LOCATION"]
to open settings screen. Will it be rejected by apple as according to some sources this is considered a private API?
Private APIs provide a way of accessing parameters or functions that aren't documented in a publicly released software development kit (SDK) or a related project. Developers working for Apple can use its private APIs as needed, but the company's App Store rules disallow third-party developers from doing the same.
To open up the settings in Swift code, first get the URL from the openSettingsURLString property that Apple provides. Then open that URL using the openURL method. To put it on an alert dialog with two options, open settings or dismiss, you could follow this code example.
Yes. The only legal way to open Settings is to use UIApplicationOpenSettingsURLString
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With