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

独自空忆成欢 提交于 2019-11-29 20:26:42

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.

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.

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.

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.

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

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

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

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

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.

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

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

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

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

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.

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

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.

  • 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

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.

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.

Lionel Synertic

Just upgrade to Xcode 8.1. It solves the problem.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!