Get Wifi information in realise mode

RicolabRicolab Member ✭✭


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 :
    If i don't use i can't build in debug mode . or 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


  • 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...

  • RicolabRicolab Member ✭✭
    edited February 20

    like in this post

    Problem was the Entitlements linked to realise mode.
    To solve problem:
    -in properties of you ios project , in bundle signing tab, there is a "custum right" textbox blank by default. Just write Entitlements.plist in this textbox. Of course you have to add Entitlement.plist file to your project with in it:


    (for me, textbox have been automatically written in debug and not in realise )

    Hope it help !

Sign In or Register to comment.