views:

354

answers:

2

I really combed this site and others. I read and re-read the related links here and the Apple docs. I'm sorry, but either I am obviously missing something right under my nose, or this Apple profile/certificate stuff is a bit convoluted. Here it is:

  1. I have a product in the App Store.
  2. I have updated it several times and users like it.
  3. My development profile recently expired just when I was improving the app for its next release.
  4. I can run the app in the simulator.
  5. I can compile and put the distribution build on my iPhone just fine.
  6. I went to the Apple portal and renewed the development profile.
  7. I downloaded it and installed it in Xcode.
  8. I see it in the Organize window.
  9. I see it on my iPhone.
  10. I CANNOT put the debug build on my iPhone to debug or run with Instruments. The message is that either there is not a valid signed profile or it is untrusted.
  11. I subsequently tried to download and install the certificate to my Mac's keychain.
  12. Still no success.
  13. I checked the code signing section of Project settings and also for the target and the root. All appears to indicate that it is using the expected development profile for debug.

Yes, I had deleted the old profile from my iPhone, from the Organizer. I cleaned the Xcode cache and all targets. I have done all of this several times and in varying sequences to try to cover every possibility.

I am ready to do anything to be able to debug with Instruments in order to check for leaks or high memory usage. Even though the distribution compile runs fine on my iPhone and plays well with other running processes, I will not release anything without a leaks/memory test.

Any ideas will be appreciated. If I missed something obvious, please forgive me - it was not due to just posting a question without searching for similar postings.

Thanks!

A: 

Try re-creating your development mobileprovision file on Apple's site. Be sure to delete all old copies from Organizer (including those on the iPhone itself).

Alexander Gladysh
Thank you for your response! Hope you were not put off by the title in caps. I'm relatively new and thought that was the way to format the title.1. Organizer does not complain when I select the provisioning file in it.2. The code sign build phase does pass in XCode.3. The application builds successfully but when it is being installed on the device, two dialogs pop up with the message, "This provisioning profile does not have a valid signature (or it has a valid, but untrusted signature)".My certificates are not expired, but should I have created a new certificate for the renewed profile?
Sorry I typed the a response to different answer. I actually did try to recreate a development profile. I did so using the same existing certificate. Maybe I should recreate the cert too? (Even though it is not expired.) Thank for very much for your response.
+3  A: 

All problems solved! I am very happy this all happened because I learned so much about Xcode, keychains, certs and provisioning. Unfortunately, there is not a simple answer. Here are the highlights:

  1. I needed to recreate the ad-hoc profile and install it on my device. (That was MY BIG oversight and the reason the dist build no longer ran on my device.)
  2. Between the very first time I created my profiles and the date my development profile expired, I upgraded to the 3.1.3 Xcode SDK.
  3. It seems that this now means you need 2 entitlements files; a debug version with the get-task-allow checked and a distribution version with get-task-allow unchecked. Each need to be set in the respective settings.
  4. In Project settings, I needed to set both my working directory and intermediate directory to the build product directory.
  5. BIGGIE - I had to double click on the target and reset the appropriate code signing profile. There was an old profile name still there for some reason! Now, I can debug, and drop my distribution on my device without a hitch.

So, in summary, I believe that my original problem (not being able to debug after renewing my dev profile) and the problem that resulted from all my efforts to fix the first were caused by:

  1. the fact that I upgraded to 3.1.3 during my dev cycle
  2. my own oversight (I apologize to Apple for my criticism)
  3. an Xcode quirk (the old profile name hanging around in target settings).

I hope this helps others. The best advise I can give is to take a day off and then create a new empty project, going through the same process step by step.

Thank you all!!

theiPhoneGuy