修复设备连接问题
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user