1

I am using the following code to get the current SSID:

var dict = CaptiveNetwork.CopyCurrentNetworkInfo(curInterface);
string localSsid = dict [CaptiveNetwork.NetworkInfoKeySSID].ToString();
Console.Writeline("Current Local SSID: " + localSsid);

However, often the result is out of date (on the order of minutes or more). I noticed that if I go into settings on the iPad and manually switch to another network just for 5 seconds and then switch back, that the code will then capture the correct SSID.

I am running iOS 5.0 and MonoTouch 3.2.12. Is my code incorrect or is this a bug in MonoTouch or iOS?

4

1 に答える 1

0

MonoTouch.SystemConfiguration.CaptiveNetwork.CopyCurrentNetworkInfoApple の への直接 p/invokeCNCopyCurrentNetworkInfoです。

IOW MonoTouch によって行われているデータのキャッシュはありませんが、あなたの説明から、iOS がそれ自体でいくつかのことを行っていると思います。バグと見なされるかどうかはわかりませんが、Appleにバグ レポートを記入することをお勧めします。

モノタッチ 3.2.12

それはおそらく5.2.12です:-)

于 2012-07-27T13:11:41.320 に答える