title: Executing `flutter run` on a remote machine makes xcodebuild fail
body: <p>I am connected to a mac via ssh and physically connected an iPhone to it.
  Now I wanted to run <code>flutter run</code> on that mac to test my app on the iPhone.</p>
  <p>When logging in graphically on the mac, <code>flutter run</code> executes without a problem.</p>
  <p>But over ssh, <code>flutter run</code> fails in the <code>xcodebuild</code> stage. It produces a generic error message</p>
  <blockquote>
  <p>Error output from Xcode build:<br>
  2022-06-07 08:39:37.623 xcodebuild[6002:21187] XType: com.apple.fonts is not accessible.<br>
  2022-06-07 08:39:37.623 xcodebuild[6002:21187] XType: XTFontStaticRegistry is enabled.<br>
  ** BUILD FAILED **</p>
  </blockquote>
  <blockquote>
  <p>Xcode's output: <br>
  Command PhaseScriptExecution failed with a nonzero exit code</p>
  </blockquote>
  <p>I was able to gather the following error message via <code>flutter run --verbose</code></p>
  <blockquote>
  <p>Target debug_ios_bundle_flutter_assets failed: Exception: Failed to codesign
  <br>
  &lt;project_folder&gt;/build/ios/Debug-iphoneos/App.framework/App: errSecInternalComponent</p>
  </blockquote>
  <p>What is going on?</p>
  <p>Why does the build fail when logged in over ssh?</p>