Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
422 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 Reply

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...