Xcode Signing certificate is invalid when build on ext device

10,144

Solution 1

Here's what worked for me:

  1. Open "Keychain Access"

  2. Find the private key called "iOS Developer"

  3. Delete the private key

  4. Try code signing again, it should work!

Solution 2

I had the same thing happen to me. I discovered my problem was that in my build settings I had set my Code Signing Identity

Debug to iOS Developer

and my

Release to iOS Distribution

Because they were different. One wasn't able to find a signing certificate. The signing certificate I had downloaded was and iOS Developer certificate so when I switched my Code Signing Identity for Release back to iOS Developer everything was fixed.

Share:
10,144
Edo
Author by

Edo

Updated on June 04, 2022

Comments

  • Edo
    Edo almost 2 years

    I'm trying to solve an issue with Xcode 8.3.3 that prevents me to test my Apps on my devices.

    At the moment I'm using a free provisioning account for my tests. I've worked many months without any problem, then I've upgraded to Sierra and Xcode 8.3.3. Unfortunately I don't know exactly after what action/update the problem started, because I have not used Xcode for several months.

    The issue: when I try to build my app to run on my iPhone, I get these errors in project page, under General > Signing view:

    Automatic signing failed Xcode failed to provision this target. Please file a bug report at http://bugreport.apple.com/ and include the Update Signing report from the Report navigator.

    Signing certificate is invalid. Signing certificate "iPhone Developer: [email protected] (xxxxxxx)", serial number "xxxxxxx", is not valid for code signing. It may have been revoked or expired.

    The issue happens either on my main Mac account and also if I create a fresh new user account, it happens also if I use another AppleID account for code signing. but it doesn't happens if I boot the same machine into another macOS installation (using the same AppleID and same device). In this last case I'm able to build and run the app without any issue on my device.

    Because of that behaviour, I think that is something related to some software crap in the first OS installation, and not related to my user's "data" nor my AppleID account.

    I've tried everything I've found on internet to clean-up the Xcode installation, including total removal/reinstall plus Keychain cleanup. But nothing solved the problem.

    I've found some related informations in this topic: https://forums.developer.apple.com/thread/83611‌ but no real solution.

    Hope that someone could help me :)

    Bye, Edoardo