Yesterday while creating a new Xamarin.Forms application, it failed to build for iOS with the following error message:
No valid iOS code signing keys found in keychain
I first thought that there was something wrong with my iOS configuration, but when I tried to create a ‘traditional’ iOS application, it just worked.
On the Xamarin forums I found the following solution that worked for me:
- Open your Xamarin.Forms projects.
- Unload the iOS project in Visual Studio.
- Open the csproj file and search for the following element
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
</PropertyGroup>
- Remove ‘
Entitlements.plist’ from the ‘CodesignEntitlements’
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
<CodesignEntitlements></CodesignEntitlements>
</PropertyGroup>