Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
421 views
in Technique[技术] by (71.8m points)

ios - Certificate has either expired or has been revoked

A while ago I started coding a new iOS app. After a long break from it, I'm working on it again and have it almost complete.

I tested it on the simulator but when I tried to install it on my iPhone 6 (something I have already done in the past), I got an error telling me that my app cannot be installed since the certificate that was used to sign this app expired or has been revoked.

I tried many things:

  1. I deleted all certificates and provisioning profiles from Xcode, keychain, and apple developer and let Xcode create me new ones
  2. I deleted Xcode and did the whole process from the beginning

But this didn't fix my issue.

Any idea what might be the problem?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Edit: This answer doesn't work for Xcode 10 and higher. See turkenh's answer.


Solution

First of all, clean the project by holding Shift(?)+Command(?)+K or Select Product > Clean

Then:

  1. Go to Xcode Menu> Preferences

  2. Select Accounts > Team > View Details

  3. Select any Provisioning profile from the Provisioning Profiles list

  4. Right-click > Select Show in Finder. Then you will see all lists of provisioning profiles

  5. Select all provisioning lists from the folder and move them to the trash

  6. Download All provisioning profiles by clicking Download All below Provisioning Profile lists.

Now, run again and it should work!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...