如何在iOS8中找到Wifi信号强度(RSSI)?
我知道Apple限制应用程序直接访问Wi-Fi数据/ API,并且不会在AppStore中接受。我找到了一个名为Stumbler的私有API,它本应该做同样的事情。这是它的链接。 Accessing & Using the MobileWiFi.framework
networks = [[NSMutableDictionary alloc] init];
void* library = dlopen("/System/Library/SystemConfiguration/IPConfiguration.bundle/IPConfiguration", RTLD_LAZY);
int (*apple80211Open)(void*) = (int(*)(void*))dlsym(library, "Apple80211Open");
int (*apple80211Bind)(void*, NSString*) = (int(*)(void*, NSString*))dlsym(library, "Apple80211BindToInterface");
apple80211Close = (int(*)(void*))dlsym(library, "Apple80211Close");
apple80211Scan= (int(*)(void*, NSArray**, void*))dlsym(library, "Apple80211Scan");
void *airport = NULL;
apple80211Open(&airport);
apple80211Bind(airport, @"en0");
NSArray* arrNetworks = nil;
apple80211Scan(airport, &arrNetworks, (__bridge void *)(networks));
//"networks" is an array of NSDictionary objects for all the visible Wi-Fi networks
apple80211Close(airport);
dlclose(library);
不知何故,这在iOS8中无效。任何人都知道如何让这个工作?谢谢你的帮助!!