NEHotspotNetwork.fetchCurrent 导致所有网络不安全

NEHotspotNetwork.fetchCurrent is giving all Network not secure

提问人:iOSCoder 提问时间:10/19/2023 最后编辑:iOSCoder 更新时间:10/19/2023 访问量:36

问:

我正在尝试获取当前连接的网络(WiFi或热点或MobileNetwork)。我正在使用以下代码片段

    NEHotspotNetwork.fetchCurrent { hotspotNetwork in
            print("Network Information")
            print(hotspotNetwork?.ssid)
            print(hotspotNetwork?.isSecure ?? true)
            print(hotspotNetwork?.bssid)
            print(hotspotNetwork?.securityType)
            print(hotspotNetwork?.signalStrength)

我能够获得Wi-Fi的详细信息。但我注意到的一件事是,无论是否受密码保护,它都会将每个网络都视为不安全的网络。如何区分安全网络和不安全网络。谁能帮我解决这个问题。提前致谢。

iOS Swift iPhone 安全 网络

评论


答: 暂无答案