Open Settings from App (like Twitter to turn on Wi-Fi) - With iOS 7.1

元气小坏坏 提交于 2019-12-10 02:24:37

问题


I know that there are a lot of Q&A saying that from iOS 5.1 it is not possible to open Settings from the app, some examples:

  • Opening the Settings app from another app
  • is it possible to open Settings App using openURL?
  • launch settings from alert

But what is really annoying is that Twitter App (version 6.2.1, iPhone 4s, iOS 7.1) is opening Settings from the application.

Check this image:

Clicking on Settings, Twitter is opening Settings and a view with title Wi-Fi. It is true that this view do not have all the Wi-Fi properties. However, it is something into Settings.

How is that possible? How is handling Twitter with that?

Someone have a clue?


回答1:


That is not the Twitter app showing the alert. That is a standard iOS alert that can appear when an app tries to use location services with no WiFi.

No 3rd party app can directly show that alert. iOS shows it and iOS takes you to the Settings app.

I just verified this with my own app. If the app already has permission to use location services, then if you do something in the app that requires location, this alert will appear when appropriate. I know for a fact that I do nothing in my code to make the alert appear but it does appear.



来源:https://stackoverflow.com/questions/22460928/open-settings-from-app-like-twitter-to-turn-on-wi-fi-with-ios-7-1

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