修复设备连接问题

This commit is contained in:
wbzhan_macbook
2019-10-10 21:02:44 +08:00
parent 347a774be9
commit 6855052852
4 changed files with 35 additions and 35 deletions
@@ -211,20 +211,19 @@ Strong UIButton *nextBtn;
}
// refer to http://stackoverflow.com/questions/5198716/iphone-get-ssid-without-private-library
//获取WiFi信息
- (id)getSSIDInfo
- (NSDictionary *)getSSIDInfo
{
NSArray *ifs = (id)CFBridgingRelease(CNCopySupportedInterfaces());
NSLog(@"%s: Supported interfaces: %@", __func__, ifs);
id info = nil;
for (NSString *ifnam in ifs) {
info = (id)CFBridgingRelease(CNCopyCurrentNetworkInfo((CFStringRef)ifnam));
if (info && [info count]) {
NSArray *interfaceNames = CFBridgingRelease(CNCopySupportedInterfaces());
NSDictionary *SSIDInfo;
for (NSString *interfaceName in interfaceNames) {
SSIDInfo = CFBridgingRelease(
CNCopyCurrentNetworkInfo((__bridge CFStringRef)interfaceName));
BOOL isNotEmpty = (SSIDInfo.count > 0);
if (isNotEmpty) {
break;
}
}
return info ;
return SSIDInfo;
}
#pragma mark --buttonClick
-(void)nextBtnClick:(UIButton *)sender{