question

MAGICMAGIC-5864 avatar image
0 Votes"
MAGICMAGIC-5864 asked RobCaplan edited

Xamarin VS 2019 - iOS - works on simulator but not phone

I'm writing a Xamarin app with Visual Studio 2019.

The app deploys fine on an Android and Android simulator.

The app also deploys fine on an iOS simulator.

But when I try to use the phone which is connected wirelessly to my MAC I receive error:

Failed to codesign 'bin/iPhone/Debug/MyFirstProject.iOS.app': Warning: unable to build chain to self-signed root for signer "Apple Development: xxxxxxxxx"
/Users/xxxxxxxx/Library/Caches/Xamarin/mtbs/builds/MyFirstProject.iOS/b3abbddebddecdd063975729ce3a99c630351cdb91eae3b0eaddcd0abeceb326/bin/iPhone/Debug/MyFirstProject.iOS.app: errSecInternalComponent MyFirstProject.iOS


Any idea how to resolve?

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The key point is this sentence: unable to build chain to self-signed root for signer. You can check if your root CA from Key Chain Access is expired, I'm afraid you should generate a new certificate. For more information , you can refer to:
https://docs.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/
https://developer.apple.com/support/expiration/
https://www.apple.com/certificateauthority/
https://stackoverflow.com/questions/48911289/warning-unable-to-build-chain-to-self-signed-root-for-signer-warning-in-xcode

0 Votes 0 ·
MAGICMAGIC-5864 avatar image
0 Votes"
MAGICMAGIC-5864 answered WenyanZhang-MSFT commented

My certificate is brand new.

When I connect the iOS phone to my computer with a USB cable, right click on OS project and deploy, it works (found this solution researching).

However, when I try to run it wirelessly, I receive that error.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I try to deploy an app to my own device with WIFI, it works. If you could deploy app with USB rather than WIFI , maybe you can clean the build, check Apple Worldwide Developer Relations Certificate Authority and connect the device again. In addition, may I ask what your version of VS is ?

0 Votes 0 ·

I am using a USB. Only way I can get it to deploy.

0 Votes 0 ·

I'm so sorry it still doesn't work wirelessly. Fortunately, It can be deployed by usb.

0 Votes 0 ·
MAGICMAGIC-5864 avatar image
0 Votes"
MAGICMAGIC-5864 answered

Also, the certificate was created on my Mac Air device by VS 2019 after I set up automatic.

The certificate is new.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.