Xcode 4 - "Valid signing identity not found" error on provisioning profiles on a new Macintosh install
Asked Answered
W

16

210

I had a Macintosh I used to develop iPhone apps with using Xcode 4. I now have a new Macintosh with a new install of... everything.

When opening Xcode projects built on the old Mac, I cannot run the app on the iPhone that was configured as a development iPhone.
Xcode 4 organizer tells me "Valid signing identity not found" on my provisioning profiles.

I guess this is something to do with the .certSigningRequest file I had generated before on the old Mac (I have a backup of that file), but what do I have to do with it on the new Mac?

Another strange thing, I don't see my 5 existing provisioning profiles (defined on Apple provisioning portal) in the organizer, even after a refresh and after having entered my provisioning portal login and password :

organizer devices screenshot

Wilcox answered 20/7, 2011 at 22:34 Comment(3)
How did you port your identity across? The easiest way is to use the import/export buttons right there at the bottom of the window you show — export from a working system, import onto the new system. That should ensure all certificates and profiles are copied.Bisque
but what if the old machine has bad hard drive (and no backup) or is already reformatted?Handle
Actually it's obvious that a question as a comment is a poor idea. (A whole new stackoverflow question. or locating the existing question is the right idea.)Mori
T
222

With Xcode 4.2 and later versions, including Xcode 4.6, there is a better way to migrate your entire developer profile to a new machine. On your existing machine, launch Xcode and do this:

  1. Open the Organizer (Shift-Command-2).
  2. Select the Devices tab.
  3. Choose Developer Profile in the upper-left corner under LIBRARY, which may be under the heading library or under a heading called TEAMS.
  4. Choose Export near the bottom left side of the window. Xcode asks you to choose a file name and password.

Edit for Xcode 4.4:

With Xcode 4.4, at step 3 choose Provisioning Profiles under LIBRARY. Then select your provisioning profiles either with the mouse or Command-A.

Also, Apple is making improvements in the way they manage this aspect of Xcode, and some users have reported that the Refresh button in the lower-right corner does the trick. So try clicking Refresh first, and if that doesn't help, do the export/import sequence.

Picture for Xcode 4.6 added by WP

screenshot of enter password to secure developer profile

Edit for Xcode 5.0 or newer:

  1. Open Xcode -> Preferences ('Command' + ',')
  2. Select the Apple ID from the list.
  3. Click on the SETTING icon near the bottom-left corner of window, and choose EXPORT ACCOUNTS... Xcode asks you to choose a file name and password.

On your new machine, launch Xcode and import the profile you exported above. Works like a charm.

Picture for Xcode 5.0 added by Ankur

For Xcode 5 or newer versions

Teeter answered 14/12, 2011 at 18:12 Comment(11)
Worked for me, after a couple of hours trying to export and import certificates and private keys from the keychain. ThanksToile
I had to go into "My Certificates" and export the certificates. It included the keys so don't worry about exporting them. After a few tries importing them all was well in Mac world again :)Newcomen
For step 3, I didn't have "Developer Profile" listed under LIBRARY. Instead I had to choose <my team name> under TEAMS.Lusatia
Would you please tell how to import this .developerprofile using command line? I have only ssh access to the host.Gooden
I keep getting "valid signing identity not found"!Illaudable
I have 2+ computers I use for development. I exported the provisioning profile on one of them, but I couldn't import it from the Organizer > Library > Provisioning Profiles page. I had to go to Library > Teams > myUserID page to be able to import the developer profile.Hapten
@GLaDOS, thanks. The Refresh method didn't fully work for me, as my keys were missing. But after exporting and re-importing my developer profile (Export/Import buttons after clicking on the team) it worked.Goose
Everything worked perfectly. I had to select "Editor -> Developer Profile -> Import" in xCode on the new machine since there was no left side tab for Developer Profile yet.Flavoprotein
I had this problem when I changed my Apple account password. The refresh option from this answer worked for me.Dougdougal
Apple is 'improving' this stuff, but introduces new pain with every step. I'm still pulling my hair out again and again...Bellied
I contributed a picture to help make this clearer for XCode 4.6 users. APPLE Y U NO MAKE THIS EASY????Mori
M
61

I just run into the similar issue today. Unfortunately my HD died on me so I couldn't do the migration mentioned here in the accepted answer. I had to do the following steps:

  1. Connect to the Apple Developer member center then the iOS provisional portal.
  2. Revoke my certificate.
  3. Create a new certificate by providing a new pair of private and public key.
  4. Remove all the previous provisioning profiles and create new ones.
  5. Download the new provisioning profiles and install them in Xcode by just dragging them to the Xcode icon in the dock.

The same action is also mentioned on this post.

Marla answered 10/8, 2012 at 17:36 Comment(5)
Thanks, this just worked for me (I don't have my old mac with me to transfer anything).Overbid
Thank you @tiguero.. My HD crashed too.. and I was struggling to find an answer for the same after recovering the data from the HD. But When I just re-created the Certificate using the keychain and provisioning portal. It solved all the issue. NOTE: We may need to modify the provisioning profile and add the new certificate to them and then re-download and re-install all of them. Cheers Coders.. I hope this helps someone looking for an answer.Sauerbraten
This is very important knowledge. (Revoking previous certificate required before you can create a new one is hardly intuitive, but it's definitely good operating practice for Apple to work this way. It makes your life hard if you lose your key though.)Mori
If you revoke a certificate which has been used to sign a in-production app, doesnt that somehow affect the app?Dino
@EmmanuelAy If your iOS Developer Program membership is valid, your existing apps on the App Store will not be affected by revoking your certificate. Have a look here: developer.apple.com/support/technical/certificatesMarla
L
17

Make sure your certificate is in the "login" keychain. Highlight the login keychain if you don't see it, search for it. Then drag the cert over the words "login". Close and re-open Xcode, ta-da.

Lightfooted answered 22/10, 2011 at 8:16 Comment(2)
Thanx a lot, everything seemed right to me, except that my certs were in the System and not Login. Wen i moved them over, everything worked like a charm!Hartwig
ohhh, simple clicking is not work as described at developer.apple.com/ios/manage/overview/index.action . The location should be selected manuallyCoffee
M
9

You need to copy over the private key and certificate from your old Mac. Open Keychain Access on the old Mac and look in the Keys category of the login keychain: the key should be there. You need to export both the public and private key, then copy yourkey.pem and yourkey.p12 to the new Mac.

Importing them using Keychain Access will probably fail, at least under 10.6; you can use these commands instead:

security import yourkey.p12
security import yourkey.pem
Molotov answered 21/7, 2011 at 0:15 Comment(6)
Keychain Access fails to export or import private keys sometimes. You can use the security command line utility in its stead. I guarantee that it works.Molotov
@Molotov : may I delete some existing entries on the new Mac ?Wilcox
You can delete entries that you don't need any more. If you aren't sure whether you may need them or not, it's better not to delete them, of course.Molotov
You should use the export/import feature of Organizer to migrate your developer profile. See the answer I just posted.Teeter
I tried all the other steps and they didn't work.. I tried this one, and the .p12 import works fine, but the .pem says it is imported, but when I go into Keychain they don't show.. and xCode still says invalid signing certificate... any suggests?Stoneman
I have a really old mac (OSX 10.6.8) and a new one (OSX 10.8.4). I just used the standard Export of the private keys in Keychain Access from the old machine, and they imported fine in the new one. After that - the Mobile Provisioning stuff in XCode organizer were all "valid".Birdcage
A
9

For the error

Valid signing identity not found

see Apple's published steps to resolve this problem.

Regarding the issue of your "5 existing provisioning profiles" on the iOS Portal which are missing from your local library in Xcode 4.x Organizer > Devices tab > Provisioning Profile section under Library.

I recommend following the steps that walks you through restoring missing profiles and also covers the case of an Xcode bug in which Xcode 4.1-4.2.1 mistakenly deletes from your local library profiles which are "Active" on the iOS Portal.

Aalto answered 4/1, 2012 at 1:7 Comment(1)
I like this answer because it actually works and their docs will try to stay updatedCheckrow
C
7

You will have to go to your developer site, go to your certificates, and generate a new one for your current MAC and add it to your keychain.

And then you will need to add the Provisioning Profile again. It should work now. Basically you need to perform the same steps you did when you first got your Dev Certificate.

Charlottetown answered 21/7, 2011 at 0:15 Comment(0)
P
7

I had the same error but the issue was slightly different. We have a team of developers but we all use the same Apple ID (Developer Account), so when I generated the Provisioning profile, I kept getting the same error as in the subject question. Then although I had downloaded the certificate (that gets prompted as part of the Development Provisioning Assistant steps), I was still getting that error. Then I found the issue was that our Apple Developer account was using a Certificate that was generated on my work mate machine, so I needed to revoke it, and generate a new certificate, then create the provisioning profile.

The Summary, the lesson learned is that the certificate that is used for your provisioning profile must be generated on the same computer where the provisioning profile will be used. This is especially important to consider when you have a team of developers sharing the same Apple ID.
Hope it helps somebody

Panjabi answered 15/1, 2013 at 4:44 Comment(1)
Another way to achieve this is to migrate your work mate's cert and private key to your keychain store. Because the provision file is associated with the cert.Pagan
A
6

My 2 cents on this error, even if not related to an export/import scenario:

when adding the mobile provisioning certificate (i.e. the PROV file), DO NOT drag the file from Finder to Keychain Access. Instead, just double click the PROV file within Finder, while keeping the Keychain Access application running somewhere.

I've actually seen my former provisioning item in Keychain (the one with yellow light) being substituted with a new, green one with same name and app ID. HTH

Acanthopterygian answered 22/5, 2012 at 20:5 Comment(1)
Thank you, also clicking Add under Provisioning Profiles under Xcode Organizer fails, while if I double click the .mobileprovision file everything works fine.Colas
J
5

I faced this problem this morning when I just opened an old app with a different certificate and allowed its access to the keychain. My other app that was working pretty well, stopped working with this error. I've been pulling out my hair till now, when I simply did this:

Xcode Menu > Preferences > Accounts > THE_APPLE_ID_THAT_YOU_ARE_USING > View Details

In the new window, at the bottom left of the Signing identities press the + button and select iOS Development. It'll re-add the identity, and after that my problem is fixed now and the app is running on the device again.

enter image description here

Jaw answered 2/11, 2013 at 19:46 Comment(0)
Z
4

My MAC OS Crashed recently. I reinstalled macOS 10.7.4 and Xcode 4.5. But all provisioning profiles were showing the following message in organizer.

Valid Signing identity not found

I struggled to find help for a couple of days. Later I realized that if you have migrated from one system to another(or formatted your system), you need to export your private key from your keychain from your old system to the new system (or new OS installed).

One can also export your developer profile/team developer profile in organizer.

Organizer > Teams > Developer Profile > Export

Hope it helps.

Zoe answered 27/9, 2012 at 7:55 Comment(0)
L
3

I had the same thing happen to me as Tiguero (thank you for your answer, it gave me hope), but here is a way to get rid of the "valid signing identity not found" error without having to delete all your provisioning profiles.

If you are on a new system and cannot retrieve your keys from another system, you do indeed have to delete and regenerate new Development and Distribution certificates for Xcode. You can do this via Xcode, or the old-fashioned way using Keychain Access.

Then what you can do is go into Provisioning, and in each tab, Development, and Distribution, click Edit next to the profile you want to update, and then Modify.

You will see a list of certificates, and you must check off the box next to the one you just made, then Submit.

Once you do this, go into your Xcode (I'm using 4.3.3) Organizer > Devices > Library > Provisioning Profiles where you are getting the error message, and click Refresh. Once you answer the prompt to enter your developer login, Organizer will re-download the profiles, and the error message should go away.

Lhary answered 10/10, 2012 at 3:43 Comment(1)
Also, after that before you build to a device you will probably have to go into your Build Settings panels and select the new iPhone Developer profile to avoid a code sign error.Lhary
O
2

I solved the "Valid signing identity not found" error with more or less:

  1. Make sure that the certificate in your iOS developer program is also listed in your keychain access and is valid (compare the issue dates). If it is not, either transfer it from your old mac using the instructions from apple reference OR delete it from the website and your keychain access and then recreate it, re-download it and drag it over Xcode.
  2. Delete any existing development or distribution provisioning profiles and recreate them based on your new certificate, redownload them and verify from keychain access that everything is valid.
Orban answered 27/1, 2012 at 12:0 Comment(0)
P
0

It seems that you can transfer your Certificates and Provisioning profiles from one machine to the other, so if you are having issues in setting up your certificate and/or profiles because you migrated your Dev machine, have a look at this:

how to transfer xcode certificates between macs

Panjabi answered 11/3, 2013 at 22:53 Comment(0)
W
0

The trick for me was discovering that even though I could see the developer cert under login, it was not under My Certificates. The fix was to export the cert from the keychain on the old mac, then import it into My Certificates/login on the new mac.

Wei answered 27/8, 2013 at 23:35 Comment(0)
H
0

No one has mentioned this yet, and this may not be a common problem, but I had a similar problem with Xcode 5: Make sure you have a default keychain selected in the Mac's Keychain Access. I trying out a fresh install of Mountain Lion and deleted one keychain, which happened to be the default. After setting another keychain as the default (right-click on the keychain and select Make Keychain "Keychain_name" default"), Xcode was able to set up the valid signing identities.

Haire answered 12/10, 2013 at 14:9 Comment(0)
R
0

I had this problem because the iOS Development Certificate associated with the provisioning profile was not in my keychain. I had reinstalled OSX and this was the result. I did the following:

  • developer.apple.com under Certificates, Identifiers & Profiles
  • select the corresponding (and valid) iOS Development Certificate, Download it
  • double click the downloaded file, it gets added to the keychain
  • errors in organizer go away

If you don't have a valid cert, generate a new one and make a new provisioning profile with it.

Rath answered 30/7, 2014 at 14:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.