Xcode 13 无法获取 wifi 网络:“nehelper 发送了无效的结果代码 [1] for Wi-Fi 信息请求”
我想获取所有附近的网络(和/或设备连接到的网络)。 我正在使用 Xcode 13 IOS14 和此代码:
NEHotspotNetwork.fetchCurrent(completionHandler: { (network) in
if let unwrappedNetwork = network {
let networkSSID = unwrappedNetwork.ssid
print("Network: %{public}@ ", networkSSID )
} else {
print("No available network")
}
})
info.plist:
功能:
我尝试了这段代码并得到了这一行: NEHotspotNetwork
nehelper 发送了无效的 Wi-Fi 信息请求结果代码 [1] 无可用网络
I want to get all nearby networks(and/or the network the device is connected to).
I am using Xcode 13 IOS14 and this code:
NEHotspotNetwork.fetchCurrent(completionHandler: { (network) in
if let unwrappedNetwork = network {
let networkSSID = unwrappedNetwork.ssid
print("Network: %{public}@ ", networkSSID )
} else {
print("No available network")
}
})
info.plist:
Capabilities:
I tried this code and got this line:NEHotspotNetwork
nehelper sent invalid result code [1] for Wi-Fi information request
No available network
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论