Fix: A Valid Provisioning Profile for This Executable Was Not Found

Fix: A Valid Provisioning Profile for This Executable Was Not Found

Written by

in

Quick answer: This error usually means Xcode is trying to run a debug build with the wrong signing setup. Open Build Settings, make sure Debug and Release use an iOS Developer identity and a development profile (not Distribution). If that does not help, in Xcode 10 go to File > Project Settings and switch Build System to Legacy Build System.

Why this happens

When you run an app on a physical device, Xcode needs a development provisioning profile. That profile has to match your bundle ID, your signing certificate and the device you are running on.

The message A valid provisioning profile for this executable was not found appears when the build is signed with something that does not satisfy those requirements. Two causes show up most often:

  • The target’s Code Signing Identity or Provisioning Profile was switched to a Distribution value, for example after archiving or distributing the app, and was never switched back.
  • In Xcode 10, the new build system handled signing differently from the old one. Many developers saw this error right after upgrading from Xcode 9, even though nothing in the project had changed, and even with fresh certificates and profiles.

Because the cause can be in the project rather than on Apple’s servers, deleting certificates, reinstalling Xcode or trying other Macs often changes nothing.

How to fix it

1. Check the signing identity in Build Settings

This is the first thing to look at, especially if you recently distributed the app.

  1. Select your project in the Project navigator, then select the app target.
  2. Open the Build Settings tab (not General).
  3. Search for Code Signing Identity.
  4. Expand the row so you can see both Debug and Release.
  5. Make sure both are set to iOS Developer (or Apple Development in newer Xcode versions), not iOS Distribution.
  6. Search for Provisioning Profile. If it is not on the automatic value, it must be your development profile, not a distribution one.

The General tab can look correct while Build Settings still holds an old distribution value, which is why this is easy to miss.

This is mainly an issue for projects that use manual signing. With automatic signing, Xcode normally chooses the right values itself.

2. Switch to the Legacy Build System (Xcode 10)

If the values above are correct and the error started right after updating to Xcode 10, try the old build system:

  1. Choose File > Project Settings… (or Workspace Settings… if you use a workspace).
  2. Open the Build System dropdown.
  3. Select Legacy Build System.
  4. Clean the build folder with Product > Clean Build Folder and run again.

This was the accepted workaround for the Xcode 10 report. Treat it as temporary. Apple has since deprecated the legacy build system, so use it only if you are stuck on that version, and return to the default build system when you can.

3. Re-check automatic signing

If you want Xcode to manage everything:

  1. Open the target’s Signing & Capabilities tab (or General > Signing in older versions).
  2. Tick Automatically manage signing.
  3. Select the correct Team.
  4. Confirm the bundle identifier is unique and matches the App ID on your developer account.

If you previously set manual values in Build Settings, reset them to the automatic defaults so they do not override what Xcode picks.

4. Reset the usual suspects

These are less likely to fix this error, but they are cheap to try:

  • Clean the build folder and delete DerivedData.
  • Unplug and reconnect the device, and make sure it is registered on your team.
  • Confirm the Mac’s date and time are set automatically.
  • Open Xcode > Settings > Accounts (Preferences in older versions), select your account and click Download Manual Profiles.

How to prevent it

  • After archiving or exporting, check that Debug still uses a development identity.
  • Prefer automatic signing for day-to-day work, and keep distribution signing for release configurations or CI.
  • Use .xcconfig files or per-configuration settings so Debug and Release signing values are explicit and visible in version control.
  • Before upgrading Xcode on a deadline, test a device build on a branch first.
  • Avoid leaving a manual profile in place when you switch teams or bundle IDs.

FAQ

Why do I get this error even though my profile exists in the developer portal?

The profile may not match what the build is asking for. The target could be set to a Distribution identity, or to a profile for a different bundle ID, certificate or device. Check Build Settings rather than only the portal.

Is the Legacy Build System safe to use?

It works as a stop-gap for Xcode 10, but it is deprecated. Use it to unblock yourself, then fix the underlying signing settings and switch back to the default.

Do I need to delete my certificates to fix this?

Usually not. In the original report, deleting and recreating certificates, reinstalling Xcode and even using another Mac did not help. Fix the signing identity and build system settings first.

Sources & credits

Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.