Donald Jackson
Donald Jackson

Reputation: 521

Xcode 8 A valid provisioning profile for this executable was not found

I know there are other questions asked like this here but I've followed all their solutions yet still end up with this error message.

I've spent a ton of time trying to figure this out now I'm hoping someone else has felt my pain and actually solved this.

UPDATE: Adding screenshots for usefulness

UPDATE 2: I gave up trying to solve this problem, I created a new project and copied source files into the new project and I now have it working. Clearly something in the project configuration/settings files got corrupted somehow in the previous project which no obvious fix available. Will leave this question open, perhaps someone has a solution eventually. I have my old 'non-working' project so will continue to try those just for curiousities sake.

Current Settings

Before this error message, Build Succeeded is shown.

Error Message

Device ID - matches profiles

List of profiles on device

Upvotes: 45

Views: 49720

Answers (20)

CyberMew
CyberMew

Reputation: 1421

I had edited my app scheme Build Configuration from Debug to Release, and unchecked the Debug Executable.

I am not sure why, but if it makes a difference my signing details for Debug and Release were different. So after I reset those back to Debug and checked back the Debug Executable box, and all was fine again.

Edit: found out it was because I was trying to run release mode on my phone via App Store provisioning profile and App Store profile doesn't allow this. I switched to Ad Hoc and there is no more issues.

Upvotes: 1

luky
luky

Reputation: 2370

I fixed it by setting in main Target / Build Settings / Section Signing

Code signing Identity: Debug and Release set to IOS Developer

Code Signing Style: Automatic

Provision Profile: all automatic.

I set this exactly same for Test Target.

Then i was able to run release version on my phone. Btw i dont know what is the difference between IOS Developer and iOS Distriobution though.

enter image description here

Upvotes: 1

ashwini rajpput
ashwini rajpput

Reputation: 11

  • Step to be followed
  • must have a developer account - https://developer.apple.com
  • create a certificate for development
  • Add devices with UDID
  • add provisioning profile in development
  • sign in Xcode with your account
  • clean build
  • Build with any destination choose device I have done for iphone 6
  • the archive will be disabled first, the archive will be active by choosing generic ios device from the right corner of Xcode for example -> yourAppName>generic ios device
  • once archive is done build for development not ADHOC
  • done

Upvotes: 1

Cee McSharpface
Cee McSharpface

Reputation: 8726

I had this problem too, and for me the solution was to sign in to https://developer.apple.com. There was a red bar, going like "our TOS have changed, you have to accept them again", I did, and then my provisioning profiles worked again immediately.

Upvotes: 2

Vittal Pai
Vittal Pai

Reputation: 3553

I solved it by changing the build system to legacy in Xcode 10

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

Upvotes: 11

Carlos Cortés
Carlos Cortés

Reputation: 11

In my case it worked for me to follow the instructions in this article. Then disable Automatically manage signing inside xcode in the general tab.

Automatically manage signing disabled

And finally provide manually Provisioning Profile for Signing (Debug) and Signing (Release)

Note: The Provisioning Profile you must generate it from Apple Developer Program website, in the section Certificates, Identifiers & Profiles -> Provisioning Profiles

I hope you find it useful. regards

Upvotes: 1

Xcodian Solangi
Xcodian Solangi

Reputation: 2408

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

Upvotes: 3

Lode Vanhove
Lode Vanhove

Reputation: 91

An easier fix is to uncheck the test target as part of the Analyze & Run steps in Edit Scheme > Build -> Build.

This is very specific to React Native projects, since this is how the projects are configured by default.

Upvotes: 1

Yevhen Kotliar
Yevhen Kotliar

Reputation: 121

GOTO: Targets->yourProjectNameTest and verify that team is the same as on yourProjectName

Upvotes: 2

Feng Liu
Feng Liu

Reputation: 1012

It works when I also add the correct signing for myProjectTests. This was the last thing I did after trying all sort of solutions for 5 hours.

Upvotes: 10

Leo Lei
Leo Lei

Reputation: 1534

ATTENTION!

Who should read

If you were developing with a "Personal Team" and is switching to a paid team, then you'll get this error if you have not updated your other targets as well.

The cause

Since I'm using react-native, I happen to have a target for test (i.e. a target called appTests), and switching the team just in one target wasn't sufficient, and leads to this error. This error isn't informative enough to let you know there's an error in one of the targets, therefore leading to a long debugging time for myself.

Solution

1) On Xcode 9, go to every targets and update the team!

2) Unfortunately, the next steps aren't very reliable from my experience, you might have to do your best to clean the caches.

3) Stop every single running scheme/application by using the stop button

4) Go to Product -> Clean and cleans every schemes you use.

5) Quit and Restart Xcode

6) Run again and hopefully it works! If not, it's likely some cache are still present.

Upvotes: 66

George Vardikos
George Vardikos

Reputation: 2437

Thats a conflict of Xcode. The way I solved it is by deleting the derived data of Xcode.

Xcode > Preferences > Locations

You will see an arrow right from the path of the DerivedData which will open them in finder. Just erase everything in the folder.

Update: According to Chandler's comment check if there is a need to delete the test target.

Upvotes: 28

Alexander Vitanov
Alexander Vitanov

Reputation: 4141

I followed many proposals but it didn't work until I unchecked Automatic signing for the TESTS

Upvotes: 7

Lex
Lex

Reputation: 41

Clearing the DEVELOPMENT_TEAM and DevelopmentTeam entries in the xcodeproj/project.pbxproj file worked for me.

Upvotes: 4

Frederic Adda
Frederic Adda

Reputation: 6092

We had a similar issue: we deleted the Unit Tests and it worked.

Upvotes: 3

Andrea Sessa
Andrea Sessa

Reputation: 888

In my case it was a conflict with the development team.

I've solved by opening my xcodeproj/project.pbxproj and emptying the following variables:

DevelopmentTeam
DEVELOPMENT_TEAM

Upvotes: 3

Boostmachines
Boostmachines

Reputation: 31

I'm on 8.2.1 and just had this same error. Deleting the original project folder and recreating it worked seamlessly. I verified that all of the signing and provisioning certificates were exactly the same as the last project. I'm not sure where the issue lies, but I believe your assumption of corrupted files is accurate.

Upvotes: 3

andbjer
andbjer

Reputation: 554

I guess you already tried this, but I just got the same error, and a quick restart of Xcode worked for me.

Upvotes: 0

Lionel Synertic
Lionel Synertic

Reputation: 9

Just upgrade to Xcode 8.1. It solves the problem.

Upvotes: -2

wottle
wottle

Reputation: 13619

You can't install a build that was signed with the app store distribution provisioning profile and certificate (I'm assuming your release scheme is set to use your app store cert and profile). It will fail to install on the device if you try. You need to use either a development profile, or an enterprise distribution profile to install on test devices. The iOS Distribution certificate can only be used to build an app that will be installed via the App Store.

Upvotes: 52

Related Questions