0

I just added a new device to the provisioning portal, generated certificate, mobileprovision, etc. My keychain has the certificate in it, my device has the app's profile on it, and there's a green checkmark underneath Status. In the build status tab of the project underneath Code Signing Identity both Debug and Release say "currently matches [my information]". However, when I try to run the app on my phone I get "A valid provisioning profile for this executable was not found."

Extra information that may or may not be relevant: The app was running in the simulator but when I tried to build it for the iPhone I got the Mach-O linker problem with armv7 architecture because I hadn't linked the necessary frameworks. So I created a new target and added the appropriate files. This target does say that my Code Signing Identity matches, and it's where I got the bundle identifier to generate the provisioning.

I have tried cleaning and building again.

jscs
  • 63,694
  • 13
  • 151
  • 195
Dustin
  • 6,783
  • 4
  • 36
  • 53
  • Have you successfully got a build onto a device before? Or is this the first time you have attempted it? – Damo Jul 09 '12 at 13:06
  • I built onto an iPad earlier today (different app) – Dustin Jul 09 '12 at 13:16
  • 1
    If you are having the Entitlements.plist in build settings, Please remove the Entitlements from CODE_SIGN_ENTITLEMENTS in Build settings and try again.. – Dilip Rajkumar Jul 09 '12 at 13:21

2 Answers2

2

Possible solutions:

  1. Sometimes there may be two different provisioning profiles with same names in Xcode for different AppIDs. Windows/Organizer(Shift+Cmd+2)/Library/Provisioning Profiles/. Check if you use the correct one.

  2. In Apple Developer Portal and Organizer check, if your provisioning profile is not expired.

  3. Check, if the provisioning profile has proper AppID or WildCard AppID. Check if it matches to the Bundle ID in Info-Plist of your project. Check also Device IDs.

  4. Did you use the same Mac before? The certificate, that is used in Provisioning Profile creation is bound to the Mac. Try to completely recreate it on your Mac or get a key file from other Mac for that certificate.

Denis Kutlubaev
  • 15,320
  • 6
  • 84
  • 70
  • I tried these out, but no luck. There is only one provisioning profile for this app (because there's only one version that goes onto the device). The provisioning profile is not expired (used it today on an iPad). It matches the ID, verified both by me checking the values and XCode saying it matches. This is the same Mac used with the provisioning profiles in other cases, and I just generated a new certificate and profile today. – Dustin Jul 09 '12 at 13:34
  • Try deleting the provisioning profilein Xcode organizer and then drag yor new one into xcode. Verify that the epiration date on the profile in organizer matches the one you just created. – Jim Jul 09 '12 at 13:48
  • The expiration date matches on both the profile and the certificate in my keychain. I deleted the provisioning profile and re-added it, but no dice. – Dustin Jul 09 '12 at 14:00
0

I ended up deleting all of the provisioning profiles and certificates on my computer, invalidating my cert on apple, and then requesting and creating a new one. Now everything works.

Dustin
  • 6,783
  • 4
  • 36
  • 53