title: Xamarin iOS code signing key not found in keychain
body: <p>I'm trying to debug my Xamarin.Forms application on a physical iPhone, from my windows machine.</p>
  <ul>
  <li>I have a Mac connected, and an iPhone connected to that Mac</li>
  <li>I have an Apple developer certificate</li>
  <li>I have the device linked to my developer account</li>
  <li>I set up automatic provisioning using Visual Studio (17.0.5)</li>
  <li>I downloaded the generated certificate, and installed it:
  <ul>
  <li>On the Mac in the System keychain and Login keychain</li>
  <li>On my windows machine running Visual Studio</li>
  </ul>
  </li>
  </ul>
  <p>When I try to deploy my application in Debug|iPhone, I get the following error:</p>
  <p><code>iOS code signing key 'Apple Development: John Doe (5L4565FZ2L)' not found in keychain.</code></p>
  <p>More details from the build output in Visual Studio:</p>
  <pre><code>2&gt;Using &quot;DetectSigningIdentity&quot; task from assembly &quot;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\..\iOS\Xamarin.iOS.Tasks.dll&quot;.
  2&gt;Task &quot;DetectSigningIdentity&quot;
  2&gt;  DetectSigningIdentity: 2022-02-06T17:49:30.9039262+01:00 - Started
  2&gt;  DetectSigningIdentity: 2022-02-06T17:49:30.9039262+01:00 - Initializing
  2&gt;  [xma]: Trying to get a Build Connection for Session '6b535ab5f3c9b550fa521b36f236660807d516f929527c4e1cb2a3ecca9ec40d': Xamarin.Messaging.Build.Client.BuildConnection.6b535ab5f3c9b550fa521b36f236660807d516f929527c4e1cb2a3ecca9ec40d, Lifetime: AppDomain
  2&gt;  DetectSigningIdentity: 2022-02-06T17:49:30.9039262+01:00 - Initialized
  2&gt;  DetectSigningIdentity: 2022-02-06T17:49:30.9039262+01:00 - There's no available inputs to copy to the Mac
  2&gt;  DetectSigningIdentity: 2022-02-06T17:49:30.9039262+01:00 - Serializing intputs
  2&gt;  DetectSigningIdentity: 2022-02-06T17:49:30.9079268+01:00 - Executing
  2&gt;  [xma]: Starting remote task execution for 'Writeful.Mobile.iOS': Xamarin.iOS.Tasks.DetectSigningIdentity
  2&gt;  [xma]: Sending Request Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic xvs/build/execute-task/Writeful.Mobile.iOS/6b535ab002fDetectSigningIdentity
  2&gt;  [xma]: Received Response of Xamarin.Messaging.Build.Contracts.ExecuteTaskMessage to topic build6b535ab5f3c9b550fa521b36f236660807d516f929527c4e1cb2a3ecca9ec40d47080johndoe/+/xvs/build/execute-task/Writeful.Mobile.iOS/6b535ab002fDetectSigningIdentity
  2&gt;  DetectSigningIdentity: 2022-02-06T17:49:30.9499278+01:00 - Logging messages
  2&gt;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1566,3): error : iOS code signing key 'Apple Development: John Doe (5L4565FZ2L)' not found in keychain.
  2&gt;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1566,3): error :         
  2&gt;  DetectSigningIdentity: 2022-02-06T17:49:30.9499278+01:00 - Finished
  2&gt;Done executing task &quot;DetectSigningIdentity&quot; -- FAILED.
  2&gt;Done building target &quot;_DetectSigningIdentity&quot; in project &quot;Writeful.Mobile.iOS.csproj&quot; -- FAILED.
  2&gt;
  2&gt;Build FAILED.
  2&gt;
  2&gt;&quot;C:\Users\johndoe\source\repos\johndoe\writeful-app\Writeful.Mobile.iOS\Writeful.Mobile.iOS.csproj&quot; (Build;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) -&gt;
  2&gt;(_DetectSigningIdentity target) -&gt; 
  2&gt;  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1566,3): error : iOS code signing key 'Apple Development: John Doe (5L4565FZ2L)' not found in keychain.
  2&gt;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(1566,3): error :         
  2&gt;
  2&gt;    0 Warning(s)
  2&gt;    1 Error(s)
  2&gt;
  2&gt;Time Elapsed 00:00:01.23
  ========== Build: 1 succeeded, 1 failed, 21 up-to-date, 0 skipped ==========
  ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
  
  </code></pre>
  <p>I'm not sure which device is missing the signing key, but I assume it is the iPhone, since I installed the certificate on the Mac.</p>
  <p>If this is the issue, how can I transfer the certificate to the iPhone? I already tried by deploying an empty app from Xcode on the Mac to the iPhone, but that didn't work.</p>