[xcode] A valid provisioning profile for this executable was not found... (again)

I know this has been asked and answered multiple times but I'm tearing my hair out as none of the proposed solutions appears to work.

enter image description here

I receive the above error, despite having a valid provisioning profile which, as far as I can tell matches the bundle identifier:

enter image description here

I've followed the steps in various suggested solutions on this site, including deleting all existing certificates and starting again, as suggested here and here.

One thing I have noticed is that the profile doesn't show up in the code signing lists, either for target or project.

Can anyone offer any further suggestions?

This question is related to xcode certificate provisioning-profile

The answer is


After wasting my half day I got this working.

Select Target > Edit Scheme > Select Run > Change Build Configuration to debug

This can happen if your provisioning profile has expired. Another reason could be that you device date exceeds the expiry date of your provisioning profile. Please make sure that your device date is correct.


In my case, it was the problem when I setup my time manually two month earlier on my iPhone. But when I changed to set time automatically, it worked fine.

Setting -> General -> Date & Time -> set time automatically

If it does not work then set time automatically of both mac & iPhone, it may work fine.


If none of above stated works then check for your device date, make sure your device date doesn't exceed profile expiry date i.e. not set to far future.


I'm still not sure what the issue was but deleting all certificates and starting over (albeit twice) eventually solved it.

My best guess is that I've missed some small but important detail of the procedure. Unfortunately I can't be any more specific than that.


In my case it was just after a new Program Licence Agreement was released so we had to accept them and it was fine.


It happened to me when I accidentally left the build in release mode.


+1 to banging my head against the wall for a day or two...

Also check this setting:

Build Settings -> Code Signing -> Provisioning Profile

After following the above steps, "Automatic" setting worked for me. ~kjm~


File > Workspace Settings > Set Build system to "Legacy Build System"

Make sure you have added your device - https://developer.apple.com/account/ios/device/create

Go into iTunes and click on the serial number and it'll change to the UDID - then right click to Copy the UDID and register it as your device.

You can then add that device to your provisioning profile.


After spending the day I realized it was a simple change in Project Settings

File -> Project Settings... -> Build System -> Legacy Build System.

In a project setting, you will see Build System named drop down and in that drop down select Legacy Build System


  1. Delete all certificates from the keychain of the account which you are trying to use provisioning profile
  2. Delete Derived data
  3. Clean the folder(cmd+sht+alt+k)
  4. Clean the project(cmd+sht+k)
  5. Build & Run

I have spent about a week solving this problem. Most of the answers are sort of magic (no logical purposes for these algorithms) and they were not useful for me. I found this error in Xcode console:

ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision."

And found this answer solving this issue. The case is to switch Xcode Build system to the Legacy one.

I was deploying my Ionic app.


Xcode5 has broken this again (congratulations to Apple for failing to bother testing one of their buggiest bits of code. Again).

A new way to break/fix it:

If you have:

  1. An old profile on your device (team profile, or non-team profile)
  2. A new profile generated automatically on the App Store, by any copy of Xcode5, even if it's simply an update to the profile you already had
  3. (NB: if any colleague adds themself to the profile, this triggers the above "change")
  4. You use the new "Accounts" dialog to download profiles (NB: this is now REQUIRED by Apple for various situations - all other approaches, including manual download, appear to be unsupported. Even though the Apple Developer site TELLS YOU TO MANUALLY DOWNLOAD! Don't do it! It breaks Xcode5!)
  5. Xcode5 will INCORRECTLY hide AND RENAME that profile in the drop-down selector in Build Settings
  6. (I detest this drop-down. Some idiot at Apple keeps removing information from it, and someone else keeps adding it back, it flip-flops between Xcode point releases. WHY??!?!)
  7. There is NO WAY you can select the correct profile - whatever you select, Xcode5 will use the wrong one

The solution is easy enough. The "Apple engineering are lazy" solution:

  1. Go to Xcode5 -> Window -> Organizer -> Devices
  2. Select your device
  3. Select provisioning profiles
  4. Delete everything relating to your current project and/or Team (even other projects, if necessary - they can all be downloaded later if still needed!)
  5. Re-build.
  6. You should get an error from Xcode5 that the profile doesn't exist. Even though you manually had seleted the profile that was ALREADY PRESENT on your machine (yep - that dropdown is buggy again. It lies about the profile it selects behind the scenes!)
  7. In the profile selector, select the "real" profile
  8. Build, run - success!

I had this error because I was testing my app to perform a certain action in the future. In other words, I had a different time on my test device, therefore, the certificate would not allow me to build.

Apparently, my certificate expires in a few days...


Examples related to xcode

Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 iPhone is not available. Please reconnect the device Make a VStack fill the width of the screen in SwiftUI error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Xcode 10: A valid provisioning profile for this executable was not found Xcode 10, Command CodeSign failed with a nonzero exit code

Examples related to certificate

Distribution certificate / private key not installed When you use 'badidea' or 'thisisunsafe' to bypass a Chrome certificate/HSTS error, does it only apply for the current site? Cannot install signed apk to device manually, got error "App not installed" Using client certificate in Curl command Convert .cer certificate to .jks SSL cert "err_cert_authority_invalid" on mobile chrome only Android Studio - Unable to find valid certification path to requested target SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch Verify a certificate chain using openssl verify Import Certificate to Trusted Root but not to Personal [Command Line]

Examples related to provisioning-profile

No signing certificate "iOS Distribution" found Xcode 8 shows error that provisioning profile doesn't include signing certificate Code signing is required for product type 'Application' in SDK 'iOS 10.0' - StickerPackExtension requires a development team error Xcode 7.2 no matching provisioning profiles found How to remove provisioning profiles from Xcode An App ID with Identifier '' is not available. Please enter a different string The executable gets signed with invalid entitlements in Xcode Is there a way since (iOS 7's release) to get the UDID without using iTunes on a PC/Mac? Find provisioning profile in Xcode 5 Xcode5 "No matching provisioning profiles found issue" (but good at xcode4)