ios: How to display “choose wireless connection” popup?

若如初见. 提交于 2019-12-09 12:07:52

问题


If there is no internet connection and you start for example the safari app with Ipad or Iphone, a popup appears saying: "Choose wireless network"

Is there a way to force this popup to show up in my app when I want to?

The problem is, I have a button in my app which connects the user to facebook. After pressing the button the safari browser opens and shows the facebook authorization page. If there is no internet connection this popup appears, but there is no way to turn back to the app from there. So currently I check internet connection before allowing this authorization page to appear, but I also want to show this popup.


回答1:


It will show up automatically if your app tries to access internet-based resource and there's no wifi connection established but there is a wifi access point nearby.




回答2:


This dialog appears automatically if you have "Application uses Wi-Fi" set to YES in your ...-Info.plist and if there is no connection.




回答3:


This is not possible. The pop-up you have seen before is in Settings -> Wi-Fi -> Ask to Join Networks -> ON/OFF

Setting this to ON allows the OS to prompt the user to join a Wi-Fi network if it finds any in reach and you are not currently connected to one.

Apps cannot show this prompt, it's a system-level prompt.



来源:https://stackoverflow.com/questions/9080549/ios-how-to-display-choose-wireless-connection-popup

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