15

I get the following error message whenever I try to build to an actual device (works fine when using the simulator, and I can build to and install via TestFlight without issue):

Unable to install "AppName"

The certificate used to sign "AppName" has either expired or has been revoked. An updated certificate is required to sign and install the application.

Everything was working fine, then this error started appearing for seemingly no reason. I have tried the following fixes (multiple times, and in varying orders), but nothing has worked:

  • Restart Mac
  • Restart Xcode
  • Re-install Xcode
  • Re-install certificates & provisioning profiles (overwriting old ones, and completely deleting old ones)
  • Delete & Revoke old certificates & re-create and install them
  • Preferences -> Accounts -> View Details -> Download All
  • Edit: Removed all expired certificates & replaced with updated versions
  • Deleted all files related to app development, then cloned fresh from git

I've tried building & running the app on a different Mac and it works fine, so it's definitely something wrong with my machine but I have no idea what.

Tam
  • 761
  • 2
  • 11
  • 19

14 Answers14

38

A Product -> Clean did all the work for me :)

Bright
  • 5,699
  • 2
  • 50
  • 72
8

Managed to solve the issue by moving the apps source files to a new directory. Still no idea what exactly was causing the issue, but this fix works well enough.

Tam
  • 761
  • 2
  • 11
  • 19
  • 1
    That may "work" but you don't want to be moving source files all the time when that happens. That's not practical solution. You really should just run "clean" and keep your files where they are. – AnnawanDev Jul 19 '19 at 15:40
3

What fixed it for me was to go to preferences and under accounts select your developer profile and go view details, then there is a signing certificate called 'iOS Development' (maybe you are signing with a different one though, but this is the automatic one) hit the reset button next to it and then try again.

Fonix
  • 11,447
  • 3
  • 45
  • 74
1

rename your catalog, don't contain Decimal point & 0(zero).

jackyshan
  • 29
  • 3
1

Follow this-

  1. How to remove provisioning profiles from Xcode to delete your certificates form machine
  2. Generate new certificates and you're done :)
  3. Clean your project (CMD-Shift-K) if you get this error Reason: no suitable image found. Did find:....
Community
  • 1
  • 1
Ankit Kumar
  • 280
  • 2
  • 17
1

remove your account in xcode preferences, add again, it works.

fewspider
  • 91
  • 2
  • 1
0

If you are sure your certificates and your provisioning profiles are valid, then you should check expired Apple hidden certificates in you Keychain Access application.

I had a similar problem while trying to submit my archive to the App Store and the solution was to update the certificate provided by Apple that expires on 14 Feb 2016 and causes impossibility of submission.

You should follow these steps:

Xcode 7 error: "Missing iOS Distribution signing identity for ..."

And also check this documentation page:

https://developer.apple.com/support/certificates/expiration/

Community
  • 1
  • 1
Bogdan Balta
  • 121
  • 9
0

I had this problem as well, and tried everything. Regenerating all my certificates. Clearing my certificates on the keychain. Regenerating my certificates and nothing worked.

Finally the solution for me was:

  1. Going to Apple Developer
  2. Navigate to Provisional profiles sections
  3. Regenerate provisional profiles (plus button) for my specific app.
  4. Then download these to my Mac and click on them to install.
Jorge Casariego
  • 21,948
  • 6
  • 90
  • 97
0

I had the same issue with a cordova application creating the ios platform.

Today I made a update of the cordova an I recognize that now also a Project.xcworkspace file were created.

Using the .xcworkspace file everything works fine. Why what cordova did change I don't know. Maybe you can inspect in detail the update here: https://cordova.apache.org/docs/en/latest/guide/overview/

enter image description here

0

This solution worked for me:

Go to Xcode -> Preferences -> Accounts -> "Your account" -> Create new iOS Development Certificate

Fin.

Said-Abdulla Atkaev
  • 4,193
  • 1
  • 11
  • 17
0

In my case, I used "Apple Development" certificate (Xcode Version 11.2.1 (11B500)) and got this error during build process.

What helped: 1. Go to preferences -> accounts. 2. Select your apple id (the one you're using development profile with). 3. Select your team from the select to the right. 4. Press "Manage certificates" button. 5. Press "+" button. 6. Select "Apple Development".

After this, build process worked.

0

In my case, I didn't need to do a clean and cold rebuild; just reselecting the same signing certificate fixed the issue.

Check whether your certificate is in-date

Open Keychain Access and look for whichever certificate you have selected for your build target in Xcode's project window. For me, it was called Apple Development: <name> (<10-character alphanumeric ID>). It showed that the expiry date was many months away, so it was clearly still in-date.

If you lack a certificate, or your existing one is out-of-date

Go to the Certificates section on developer.apple.com. There are multiple types (e.g. Development and Distribution); look for one that matches the purpose you're trying to sign for.

If one is in-date, download that; if it's not, generate a new one and download that instead; then double-click it to store it into your system keychain.

Reselecting an in-date certificate

Even if your currently-selected certificate is in-date, Xcode may simply be misbehaving and reselecting may help (as it did in my case).

Go to the project window in Xcode, and select the target you want to build. Deselect "Automatically manage signing" and reselect it, then select your team. A valid signing certificate should become associated upon choosing your team.

Now try building your app again. Worked for me!

Jamie Birch
  • 5,839
  • 1
  • 46
  • 60
0

In Build Phases -> Embed Frameworks, one of my frameworks I had recently added to the project wasn't checked for Code Sign On Copy. Checking this value fixed the error.

FrothSturgeon
  • 106
  • 1
  • 4
0

Remove all the files under ~/Library/Developer/Xcode/DerivedData.

Yongqiang Zhou
  • 322
  • 1
  • 12