问题
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?
回答1:
Yes. The only legal way to open Settings is to use UIApplicationOpenSettingsURLString
.
回答2:
My app just got rejected because of this, so yes, it is considered as private API :)
Here's the rejection notice from Apple:
Your app uses the "prefs:root=" non-public URL scheme, which is a private entity. The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.
回答3:
To resolve this issue, if you are navigating to Settings > Privacy. "Just remove that code" and put a simple alert showing Enable location services.
Because from iOS 10 apple consider it is as private entity. So you can not go through it.
回答4:
There’s no supported way to open Settings to the Wi-Fi/Language/Location ‘page’. The fact that this worked in iOS 9 is a bug that’s been fixed in iOS 10.
For more info please refer https://forums.developer.apple.com/message/186656#186656
来源:https://stackoverflow.com/questions/49487846/is-it-considered-a-private-api-to-use-app-prefsroot