ios: How to display “choose wireless connection” p

2019-03-29 07:05发布

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.

3条回答
【Aperson】
2楼-- · 2019-03-29 07:30

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.

查看更多
Melony?
3楼-- · 2019-03-29 07:30

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

查看更多
叛逆
4楼-- · 2019-03-29 07:45

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.

查看更多
登录 后发表回答