Get Wifi information in realise mode

RicolabRicolab Member ✭✭

Hi

I'm trying to get SSID of the current wifi my device is connected. On android side everything work well but on the IOS side i have trouble.

When i use my application in Debug mode i obtain SSID and everything is ok. I use standard method:

NSDictionary dict;
var status = CaptiveNetwork.TryCopyCurrentNetworkInfo("en0", out dict);
if (status == StatusCode.NoKey)
return "";
if (dict == null) return "";
var ssid = dict[CaptiveNetwork.NetworkInfoKeySSID];
return ssid.ToString();

BUT when i build realise , send it to testflight and test it on same device (ipad ios12) , impossible to get SSID (always null)

  • AppleID have "access wifi information " selected for development and distribution

  • Provisionning profiles are good and installed for development and distribution

  • In entitlements , i have had : com.apple.networking.wifi-info
    If i don't use com.apple.developer.networking.wifi-info i can't build in debug mode . com.apple.developer.networking.wifi-info or com.apple.networking.wifi-info has no effect for realise.

In this forum someone propose to create a new APid but i would like to do it for last solution...

I don't know what to do. If anybody have ideas?

Thanks for your help

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    I used your code to obtain wifi information on my iPhone. It works properly both on development version and TestFlight version. Could you try another device or Wifi to test it?

  • RicolabRicolab Member ✭✭

    Thanks for your test.
    Are you on IOS12? I have tested differents devices (on ios12) and wifi with the same result (ok in debug , no in realise).
    It look like a bugg in the apple entitlement.
    Last solution is to create a new ApID to apply to the same application and hope , but i am affraid about conflicts and have to rebuild store page etc...

Sign In or Register to comment.