1

I am trying to build an update to my Mac app. As usual, I clicked Product>Archive then, in the Organiser, I clicked Distribute...>Export Developer ID-signed Application. Xcode finds my Developer ID, but it fails with the error "Code signing operation failed - Check that the identity you selected is valid."

Code Sign Error

This has never happened before, so I'm at a bit of a loss - I most recently exported a version of my App last week.

The only things that have changed are:

  1. I have changed my Apple ID password
  2. I added Cocoapods to my project and I'm now using the .xcworkspace file, rather than the .xcodeproj file.

I've tried refreshing the Teams list in the Xcode organiser, deleting all my Mac development and distribution certificates, restarting Xcode, and asking very nicely, but I'm still getting the same error.

colincameron
  • 2,696
  • 4
  • 23
  • 46
  • You've done the right part in xcode, the only place that might be the problem is the Dev portal. Check your Dev certs in there if needs be you may have to remove those and request them again then sync them with xcode. That has worked for me before and might work out for you. – Adrian P Jun 07 '13 at 13:04
  • Do you mean revoke the certificates in the Dev centre? Will that affect any previous code signed applications? – colincameron Jun 07 '13 at 15:28
  • Yes revoking the certs. And no that will not affect any apps you already have on the App Store. Also there will be no effect on the other apps you are working on. – Adrian P Jun 07 '13 at 16:09
  • Thanks, will give that a go Monday – colincameron Jun 08 '13 at 16:40
  • @CodeMonkey - your suggestion worked perfectly. Write it up as an answer and I'll accept it. Thanks for the help! – colincameron Jun 10 '13 at 11:22
  • Just did, and am glad your issue was resolved.:) – Adrian P Jun 10 '13 at 11:53
  • @c.cam108 Revoking Developer-ID Certificates isn't possible through the portal, you can't revoke that without manually emailing apple. I'm assuming you just created a new Dev-ID Certificate. please clarify what you did ? – Mostafa Berg Sep 04 '13 at 21:08

2 Answers2

1

You've done the right part in xcode, the only place that might be the problem is the Dev portal. Check your Dev certs in there if needs be you may have to remove those and request them again then sync them with xcode. That has worked for me before and might work out for you.

Adrian P
  • 6,479
  • 4
  • 38
  • 55
  • How did this work for you before ? you cannot revoke Developer ID certificates from the portal and must contact apple directly by email to do so. product-security@apple.com – Mostafa Berg Sep 04 '13 at 19:19
  • @mostafa, unless apple has changed their policy, which I know they didn't, you can revoke your certs I. The apple developers portal and issue another one. This is did deferent from the developer license you get when you pay 99 dollars. Your provisioning and distribution and all other certs can be revoked and re started again. – Adrian P Sep 04 '13 at 20:02
  • nope you're wrong, I'm talking about Developer ID Certificates, those are not revokable, the only Certificates you can revoke are Distribution and Development Certificates, but DevID are not revokable, and must be done using an Email request. Please note I'm talking about Developer-ID signing as OP, not Mac Distribution Certificates :) – Mostafa Berg Sep 04 '13 at 20:59
  • @mostafa, I don't believe the question above that was answered was related to that. For more information about the developer Id you should refer to apple docs. If you have a question I suggest you open a new question then I will answer that if I can. And for your information I was talking about developer certificate not id. – Adrian P Sep 04 '13 at 21:50
  • In addition to the above said, the user solved his issue by the way I suggested and your comments although are welcome, are unnecessary. – Adrian P Sep 04 '13 at 22:00
  • I just noticed your answer was misleading, and I was asking for clarification on that, that's all :) I suggest you read the apple docs too, check what the first note says: https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/DistributingApplicationsOutside/DistributingApplicationsOutside.html it directly states that: `You need to contact product-security@apple.com to revoke Developer ID certificates.` The title of this question says `Cannot export developer ID signed Mac app` See my point ? Your answer does not solve the question. – Mostafa Berg Sep 05 '13 at 07:56
  • @MostafaTorbjørnBerg you're right, you cannot revoke the Developer ID certificates, but you are able to revoke the Mac Development and Distribution certificates (the certs I mentioned in my question). Revoking these solved my problem, so I would suggest that your comment of "Your answer does not solve the question" is incorrect, or else I would never have accepted the answer. If you have your own question that this answer does not solve, I'd suggest you ask it separately. – colincameron Sep 05 '13 at 09:02
  • @c.cam108 I don't have any questions, I'm just stating the mistake I saw to avoid confusing other users, your question was about DevID certs, he responded with revoke all certs and recreate, people will immediately assume that the answer is talking about DevID certs, which is wrong, that's my whole point.. you should probably edit your question to clarify this point – Mostafa Berg Sep 05 '13 at 10:27
0

In case anyone ends up here, but still has the problem after checking everything in the dev center,

try removing extraneous files form the project. For me these were:

Gruntfile.js, karma-e2e.conf.js, karma.conf.js, and the entire node_modules directory.

see: How to build IPA for distribution with TestFlight with XCode 5?

Community
  • 1
  • 1
Michael
  • 2,973
  • 1
  • 27
  • 67