關於iPhone/iPad的iOS系統自動彈出認證視窗問題

來源:互聯網
上載者:User

標籤:des   class   blog   code   http   tar   

前言

路由器,證明伺服器,手持無線終端。當通過手持無線裝置串連到需要認證的WiFi上,會自動快顯視窗,何解?為什麼有的時候就不快顯視窗呢?怎麼給商家一個合理的解釋呢?


驗證問題

通過在路由器上抓包來看快顯視窗的時候都發生了什嗎? 抓包方法如下http://blog.csdn.net/qianguozheng/article/details/32108093


當彈出認證視窗的時候都發生了什嗎?

當沒有彈出認證視窗的時候,沒有彈出認證視窗。


原理剖析

https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/Platform-SpecificNetworkingTechnologies/Platform-SpecificNetworkingTechnologies.html

Register for Captive Network SupportA captive network is a Wi-Fi network that doesn’t provide Internet access until the user performs some action, such as logging in, specifying payment, or agreeing to terms and conditions. Captive networks common in public areas, such as airports and hotels.When a user joins a captive network, Captive Network Support typically provides a web sheet that allows the user to authenticate with the network. If your application registers the SSID of the captive network, however, the web sheet is suppressed, and the user can complete authentication in your application.For more information, read CaptiveNetwork Reference



https://developer.apple.com/library/ios/documentation/SystemConfiguration/Reference/CaptiveNetworkRef/Reference/reference.html#//apple_ref/doc/uid/TP40009770-CH101-DontLinkElementID_4

OverviewThe CaptiveNetwork programming interface allows an application to interact with Captive Network Support, the system component responsible for detecting networks that require user interaction before providing internet access. These networks are most commonly WiFi hotspots in public locations such as airports and hotels.By calling the CNSetSupportedSSIDs function, an application can register a list of wireless network SSIDs with Captive Network Support, thereby assuming responsibility for authenticating with those networks. Typically when a user joins a captive network, Captive Network Support provides a web sheet that allows the user to authenticate with the network. If an application has registered the SSID of the captive network, however, the web sheet is suppressed, and the user can complete authentication in the appropriate application.After a user performs authentication in the application that registered the SSID, the application should inform Captive Network Support of the result of the authentication with either the CNMarkPortalOnline function or the CNMarkPortalOffline function

總結

iOS是蘋果的結晶啊,這是最大限度的提供使用者良好的使用者體驗,做出的功能,但是並不是一個標準,所以遇到自己解釋不了的問題,從原理上分析,從根本上解決問題,不要等到問題到了不可收拾的地步,才去想怎麼辦。

captive.apple.com 就是蘋果的一個Server.用來增強使用者體驗的。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.