A valid provisioning profile for this executable was not found.

I am having the similar problem expressed through numerous posts over the years (each of which I have read carefully, attempted to resolve based on those solutions, yet have a unique scenario here).

When attempting to build/run on any of my iPhone test devices it is failing to install the provisioning profile:

A valid provisioning profile for this executable was not found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620395

Here's a breakdown of what I have done, but first...

NOTE: I have 2 separate apps that I'm testing. All of the following settings are the same for both. One of them runs fine, but the other fails as described.

To start totally clean I did the following:

  • Upgraded xCode to the latest (14.2) version
  • Updated my iPhone to latest version 15.7.3
  • I deleted all my provisioning profiles, signing certifications, developer certificates, etc. and went and recreated them all from scratch.
  • Created a new certificate signing request files, then used them to create new distribution certificate and APN certificates (downloaded aps.cer, double clicked to install to Keychain Access.
  • Created new provisioning profiles, downloaded, double clicked to install to xcode (but they don't show up or work).

After doing this one of my apps runs fine on my devices but the other still throws that same error about the provisioning profile???

I have also tried a number of the various suggested solutions:

  • Went into xCode > Windows > Devices and Simulators and right clicked on my device to select Show Provisioning Profiles... deleted them from here, then clicked "+" to attempt to add it manually but the error pops up "Failed to install one or more provisioning profiles on the device."
  • I have tried unchecking "Automatically manage signing" in xCode then manually selecting the provisioning profile, but when attempting to build/run on device the same error happens.
  • I have even gone into Users/MYACCOUNT/Library/MobileDevice/Provisioning Profiles and confirmed the individual .mobileprovision files are there (I deleted all of the other ones just to make sure).

Really could use some help here... again, the bizzare thing is I started with a clean slate, took the same steps with 2 separate apps, one works fine but the other continues getting this error? What am I missing???

Post not yet marked as solved Up vote post of wwwguy Down vote post of wwwguy
1.8k views

Replies

Solved it. Messy any who knows which part fixed it but here's what I did...

  • Xcode > Settings > Account - logged out then back into my Apple account
  • In Signing & Capabilities - unchecked then rechecked "Automatically manage signing"
  • Xcode > Product - "Clean build folder"
  • Thanks for posting your solution. For me, the step that fixed it was your last one: -- Xcode > Product - "Clean build folder"

Add a Comment