我刚刚开始制作iPhone Wifi扫描应用程序。我搜索了很多网站,最后我有最近的代码如下。有人说这对iPhoneOS4.0起作用了。
libHandle = dlopen("/System/Library/SystemConfiguration/WiFiManager.bundle/WiFiManager", RTLD_LAZY);
open = dlsym(libHandle, "Apple80211Open");
bind = dlsym(libHandle, "Apple80211BindToInterface");
close = dlsym(libHandle, "Apple80211Close");
scan = dlsym(libHandle, "Apple80211Scan");
但是,我有以下警告。
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0.1/Symbols/usr/lib/libpcap.A.dylib" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0.1/Symbols/System/Library/SystemConfiguration/WiFiManager.bundle/WiFiManager" (file not found).
我正在使用xcode_3.2.3_and_ios_sdk_4.0.1和越狱,解锁并更新到4.0.1的iPhone 3G设备。
我知道,如果我使用私有API,无法提供服务并冒风险,但我应该这样做。 如果您对此有任何疑问,请告诉我。