我想检查WIFI信号强度以显示弱WIFI信号的某种消息。
我认为在iOS 8及更早版本中无法实现。
iOS 9中是否有可能获得wifi信号强度?如果答案是肯定的那么如何?
答案 0 :(得分:7)
答案 1 :(得分:6)
将您的应用注册为热点助手。 (forums.developer.apple.com/message/30657#30657)
#import <NetworkExtension/NetworkExtension.h>
for(NEHotspotNetwork *hotspotNetwork in [NEHotspotHelper supportedNetworkInterfaces]) {
NSString *ssid = hotspotNetwork.SSID;
NSString *bssid = hotspotNetwork.BSSID;
BOOL secure = hotspotNetwork.secure;
BOOL autoJoined = hotspotNetwork.autoJoined;
double signalStrength = hotspotNetwork.signalStrength;
}
答案 2 :(得分:0)
确实如此,但您需要Apple的许可。 Apple允许您使用HotspotHelper框架后,您将能够使用热点帮助程序权限创建配置文件。查看此帖子:How to get Wifi SSID in iOS9 after CaptiveNetwork is deprecated and calls for Wifi name are already blocked