Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it considered a private API to use App-prefs:root?

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?

like image 833
Ross Stepaniak Avatar asked Mar 26 '18 09:03

Ross Stepaniak


People also ask

What is a private API Apple?

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.

How do I open settings in Swift?

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.


1 Answers

Yes. The only legal way to open Settings is to use UIApplicationOpenSettingsURLString.

like image 94
Gereon Avatar answered Oct 25 '22 22:10

Gereon