简体   繁体   English

iOS:检测WIFI是否已通过身份验证?

[英]iOS: Detect if WIFI has been authenticated?

There are times when you connect to a Starbucks Wifi, the auth page does not automatically pop up. 有时您连接到星巴克Wifi,auth页面不会自动弹出。 The auth page (the one where you press "Agree" to the Wifi terms) shows up when you start using Safari. 当您开始使用Safari时,会显示身份验证页面(您按“同意”到Wifi条款的页面)。 Is there any way to detect if the auth page has already been shown on the device in my app? 有没有办法检测我的应用程序中的设备上是否已显示auth页面?

Try to download a file somewhere, that you know will never move ( www.google.com ), and whose contents you already know (thats the hard part). 尝试下载一个文件,你知道永远不会移动( www.google.com ),你已经知道的内容(这是困难的部分)。

Compare the downloaded content with the content that should be downloaded, and you'll know you're on some authentication page or not. 将下载的内容与应下载的内容进行比较,您将知道自己是否在某个身份验证页面上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM