0

Before the Mountain Lion release, I was running Lion on a separate partition. I used the Lion partition for all me development, building, running on devices and submitting to the App Store. All was well until the day of the ML release. I upgraded the ML partition, and trashed the Lion partition entirely. Now, I can't run on devices. I've gone through hell trying to get all my certificates, provisioning profiles and what not in order. It worked like a charm on the Lion partition, but now I have to start from square one. I've tried to create new profiles for my devices, that doesn't work, I tried downloading a new certificate, but now I've just confused myself and I can't tell what I'm doing. How can I get it working again!?

If it helps, I do have a Time Machine backup of the Lion computer.

Thanks a ton!

JohnWickham
  • 571
  • 1
  • 6
  • 15
  • What is the error message that you get? In the organizer, when you right click the device and say "Add device to provisioning portal" what do you get? It helped for me recently to download the certificate and drag drop it into xcode. It was a bit a back and forth but at the end it worked and I had the idea xcode just does not handle all the different situations but with some trial in error it resets itself and does it smoothly. – hol Aug 06 '12 at 06:17
  • The problem lies with the code signing settings (in the projects build settings). It says "Code Sign error: Provisioning profile 'XXX' can't be found". It's because I had it working before I started using the Lion partition, now the project is looking for the profile I was using on the Lion partition. When I try to change the code signing identity in the Build Settings, all the other options are 'gray-ed out' saying "Profile doesn't match any valid certificate/private key pair in the default keychain. Then I looked in my Keychain Access, and I don't have a private key at all. – JohnWickham Aug 08 '12 at 04:24
  • What happens if you go to the member center and download the certificate again and open it, so that it gets added to the keychain. Does it work then when you right click the iphone in xcode and say "add device to provisioning portal"? – hol Aug 08 '12 at 16:43
  • I looked at the certificate in the iOS Dev. center and it says the profile "XXX" matches this certificate. The certificate is in my Keychain, but in the Xcode organizer it still says "Valid signing not identity found" – JohnWickham Aug 09 '12 at 19:14
  • Update! Now we're getting somewhere... I changed the value in the project's build settings to match the certificate in my keychain, but now the build fails with "There are no valid certificate/private key pairs in the default keychain" – JohnWickham Aug 09 '12 at 19:19

2 Answers2

0

There is no need to create certificate again while upgrading to Mountain Lion.Problem is some where else.

0

Following these steps solved the problem for me.

Good luck!

  1. Close Xcode
  2. Right click on your project’s .xcodeproj bundle to show it’s contents.
  3. Open the .pbxproj file in a text editor of your choice (make a backup copy first if you feel paranoid)
  4. Find all lines in that file that include the word PROVISIONING_PROFILE and delete them.
  5. Open Xcode and clean your project
  6. Build your project

(Courtesy of pixeldock)

Reuven
  • 2,142
  • 3
  • 18
  • 30
  • Thanks, but I solved the problem a while ago. I deleted all my provisioning profiles and certificates from KA, requested all new certificates and profiles and everything works! – JohnWickham Oct 17 '12 at 17:33