2

sorry if I redact more than I need to, I’m an idiot beginner.

I tried to run a test project on my own physical iPhone but ran into a Command CodeSign error. Researched a bit, it looks like I can try deleting duplicate/redundant certificates. As you can see in the screenshot, not 1, not 2 but my Xcode has 3 seemingly duplicate certificates. My question is: are they really all the same? I see that I am signed in with a certifcate dated Aug 2021. Should I delete the new ones or keep the latest one that is expiring in Sep 2031? I am very worried that I will shoot myself in the foot if I delete the wrong ones.

(If this doesn’t work, I would have to delete and and reinstall Xcode completely. It would take a lot of time as my MacBook is an older model. So any advice to avoid that will be greatly appreciated. I already spending way too much time on this “side error” instead of actually practicing/learning Swift. It’s soul crushing. )

BIG THANKS in advance.

enter image description here enter image description here

Edit: enter image description here

Jeshua Lacock
  • 5,730
  • 1
  • 28
  • 58
Walter Pak
  • 79
  • 7
  • 1
    Can you click on your target, hit the "Signing & Capabilities" tab and take a screenshot? – Jeshua Lacock Jul 31 '22 at 05:27
  • 1
    Note that reinstalling Xcode won't do anything to the certificates in your Keychain. They will be left the same. – Jeshua Lacock Jul 31 '22 at 05:29
  • Hi @JeshuaLacock Screenshot attached :) – Walter Pak Jul 31 '22 at 05:36
  • 1
    I'd suggest going to the Accounts preferences (your 3rd image) press the + button and choose add Development or Distribution certificate (depending on what your current needs are). It should then show a valid date for your certificate which it currently does not. – Jeshua Lacock Jul 31 '22 at 05:41
  • 1
    IT WORKS! THANK YOU SOOOOO MUCH!!! If you would like to put your help in an answer, I am more than happy to put the green checkmark on it. :) – Walter Pak Jul 31 '22 at 05:52
  • 1
    Cheers, thanks and glad you got it working. A number of things can cause this, so we got lucky. – Jeshua Lacock Jul 31 '22 at 05:55

1 Answers1

1

I'd suggest going to the Accounts preferences (your 3rd image) press the + button and choose add Development or Distribution certificate (depending on what your current needs are).

It should then show a valid date for your certificate which it currently does not.

Jeshua Lacock
  • 5,730
  • 1
  • 28
  • 58