简体   繁体   English

有没有办法从Iphone获得信号强度?

[英]Is there a way to get Signal Strength from Iphone?

Is there a way to get Signal strength from Iphone using wifi ? 有没有办法通过wifi从Iphone获得信号强度? I know that Public API's do not allow. 我知道Public API是不允许的。 Istumbler allows it. Istumbler允许它。 But it is closed. 但它已经结束了。

With the Private API's is it possible ? 使用私有API是可能的吗? I do not want to keep on app store, so I do not mind that. 我不想继续使用应用商店,所以我不介意。

Would the code for that be available ? 它的代码是否可用?

Thanks for that. 感谢那。

I found one code for that : 我发现了一个代码:

int getSignalStrength()
{
    void *libHandle = dlopen("/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony", RTLD_LAZY);
    int (*CTGetSignalStrength)();
    CTGetSignalStrength = dlsym(libHandle, "CTGetSignalStrength");
    if( CTGetSignalStrength == NULL) NSLog(@"Could not find CTGetSignalStrength");  
    int result = CTGetSignalStrength();
    dlclose(libHandle); 
    return result;
}

But I dont know what I should pass in "/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony". 但我不知道我应该在“/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony”中传递什么。

I have never used IOS development. 我从未使用过IOS开发。 But I want to run this and test. 但是我想运行它并进行测试。 Can anyone help me what I should do ? 任何人都可以帮我做我应该做的事情吗?

How I should keep the code ? 我该如何保留代码?

You can only achieve this with private API calls. 您只能通过私有API调用来实现此目的。 There is a list on google code with all the functions related to 802.11 devices. Google代码上有一个列表,其中包含与802.11设备相关的所有功能。 Apple80211GetInfoCopy should be the one you're looking for. Apple80211GetInfoCopy应该是您正在寻找的那个。

But remember that you will not get this into the AppStore... 但请记住,你不会把它带入AppStore ......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM