標籤: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.用來增強使用者體驗的。