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

拥有回忆 提交于 2019-11-26 06:46:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!