Xamarin Auth Store Keychain not working after ios10 upgrade

I was digging through the link Pat sent in the comment: bugzilla.xamarin.com/show_bug.cgi?id=43514

And found a helpfull comment by Pavel Sich, he said:

Just make sure you enable the keychain access in Entitlements and select the entitlements for Simulator (Debug) builds too. By default this is not set.

In my xamarin solution, I double clicked the .IOS project to open the options pane, selected IOS Bundle Signing and changed the Platform select box from "iPhone" to "iPhoneSimulator", then set the field Custom Entitlements to my Entitlements.plist. Now it's working fine for me.

Just a note, this is after editing the Entitlement.plist as suggested by Thibault D. in the previous answer.

Hope this helps.


It seems that when you work on IphoneSimulator even you enabled KeyChain in Entitlements.plist, it still doesnt work and throws this exception. Because Xamarin doesnt seem to have CodesignEntitlements sets for IphoneSimulator configuration as default although it has for Iphone configurations. You have to open your IOS.csproj file and manually add this line

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">

  <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>

Set Custom Entitlements in ios project settings enter image description here


According to this thread it's enough that you add an empty entitlements file in you bundle singing configuration:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
  ...
  <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>

Empty Entitlements.plist file:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>