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

3
  • 4
    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.
    – Tommy
    Jul 21, 2011 at 0:23
  • 2
    but what if the old machine has bad hard drive (and no backup) or is already reformatted? Jul 16, 2012 at 11:51
  • 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.)
    – Warren P
    Mar 25, 2013 at 12:40

16 Answers 16

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

11
  • 20
    For step 3, I didn't have "Developer Profile" listed under LIBRARY. Instead I had to choose <my team name> under TEAMS. Jun 21, 2012 at 0:56
  • 9
    I keep getting "valid signing identity not found"!
    – RGML
    Jul 4, 2012 at 15:41
  • 7
    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.
    – GLaDOS
    Jul 14, 2012 at 14:56
  • 7
    Apple is 'improving' this stuff, but introduces new pain with every step. I'm still pulling my hair out again and again...
    – brainray
    Jan 28, 2013 at 14:17
  • 4
    I contributed a picture to help make this clearer for XCode 4.6 users. APPLE Y U NO MAKE THIS EASY????
    – Warren P
    Mar 25, 2013 at 12:52
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.

5
  • Thanks, this just worked for me (I don't have my old mac with me to transfer anything).
    – Jamie G
    Nov 14, 2012 at 14:52
  • 1
    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. Dec 19, 2012 at 10:53
  • 1
    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.)
    – Warren P
    Mar 25, 2013 at 12:54
  • If you revoke a certificate which has been used to sign a in-production app, doesnt that somehow affect the app?
    – Mani
    Sep 3, 2013 at 18:58
  • 2
    @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/certificates
    – tiguero
    Sep 3, 2013 at 22:46
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.

2
  • 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!
    – pat
    Feb 15, 2012 at 6:52
  • ohhh, simple clicking is not work as described at developer.apple.com/ios/manage/overview/index.action . The location should be selected manually
    – sergtk
    Jul 17, 2012 at 7:29
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
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.
    – LaC
    Jul 21, 2011 at 0:24
  • @LaC : may I delete some existing entries on the new Mac ?
    – Oliver
    Jul 21, 2011 at 0:29
  • 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.
    – LaC
    Jul 21, 2011 at 0:34
  • 2
    You should use the export/import feature of Organizer to migrate your developer profile. See the answer I just posted. Dec 14, 2011 at 18:14
  • 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? Mar 31, 2013 at 1:38
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.

1
  • 1
    I like this answer because it actually works and their docs will try to stay updated
    – oky_sabeni
    Mar 22, 2013 at 3:36
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.

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

1
  • 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. Jan 8, 2021 at 14:59
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

1
  • 1
    Thank you, also clicking Add under Provisioning Profiles under Xcode Organizer fails, while if I double click the .mobileprovision file everything works fine.
    – damix911
    Jun 14, 2012 at 9:30
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

0
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.

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.

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.
    – Catherine
    Oct 10, 2012 at 4:03
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.
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

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.

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.

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.