8

"A valid provisioning profile for this executable was not found" is displayed when I do a "command I" or XCode Product Menu and select the Profile menu item.

I want to profile my iPhone application for memory leaks. I have a valid team provision profile and I have a valid app specific provisioning profile and distribution profile.

I must need to setup something in the build settings but I can't figure it out. Searching for invalid provisioning profile for profiling has too many profile words in it and I don't find anything.

I hate to bother everyone, but I am out of ideas on how to search for a solution or find the answer.

Phill Campbell
  • 1,075
  • 1
  • 8
  • 17
  • How about the provisioning profile on device, did you verify it? – Praveen S Jul 30 '11 at 18:15
  • Of course I get it to work just after I post this. I changed the build settings to use iPhone Developer profile for release instead of my distribution profile. I don't know if that is the best, but that worked. Now I can use Instruments to look for memory leaks. – Phill Campbell Jul 30 '11 at 18:20
  • Is this the best practice to use for this? I ran into the same issue when using a release build (which seemed to be the default) – Marchy Nov 02 '12 at 01:39

1 Answers1

3

Most secure way how to setup your provisioning settings from my experience is as follows:

  1. Go to the Project build settings tabs (above your targets where you set your code signing)
  2. Set "Don't code sign" to all the fields, this is to make sure you not going to run into any trouble in the future. This has cased me a lot of trouble during app submissions in the past
  3. Go to your targets Build settings tab
  4. Set both debug (Parent Debug and it's Any iOS SDK child to "iPhone developer" this is extremely important especially if you work in a team. There is nothing worse than someone setting up their own profile and than committing to the code repository!
  5. Set provisioning for your Production / Enterprise or AdHoc statically as you should be in control of what provisioning profile is being used for the any distribution build.

Since I have switched to this, I never had a problem with a build that didn't work, was incorrectly signed or similar!

Also, every device I connect to any machine for the first time I add to the developer portal through the nice + (plus) button to make sure both device and Mac have the latest provisionings!

Ondrej Rafaj
  • 4,070
  • 7
  • 38
  • 61