Is it possible to get wifi signal strength in ios 9

南笙酒味 提交于 2019-11-30 03:13:42

问题


I want to check WIFI signal strength to display some kind of message for weak WIFI signal.

I fount that it is not possible in iOS 8 and older.

Is it possible to get wifi signal strength in iOS 9? and if answer is yes then How?


回答1:


Yes , it is possible in iOS 9.Look into NEHotspotNetwork




回答2:


Register your app as Hotspot helper. (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;
}



回答3:


It is, but you need permission from Apple. Once Apple allows you to use the HotspotHelper framework, you'll be able to create profiles with the hotspot helper entitlements. Check this post: How to get Wifi SSID in iOS9 after CaptiveNetwork is deprecated and calls for Wifi name are already blocked



来源:https://stackoverflow.com/questions/32970711/is-it-possible-to-get-wifi-signal-strength-in-ios-9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!