简体   繁体   English

Xcode 8找不到此可执行文件的有效配置文件

[英]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. 更新2 :我放弃了尝试解决这个问题,我创建了一个新项目并将源文件复制到新项目中,现在我已经开始工作了。 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. 我有一个旧的“非工作”项目,所以将继续尝试那些只是为了好奇。

当前设置

Before this error message, Build Succeeded is shown. 在此错误消息之前,将显示Build Succeeded

错误信息

设备ID  - 匹配配置文件

设备上的配置文件列表

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 (ie a target called appTests), and switching the team just in one target wasn't sufficient, and leads to this error. 由于我正在使用react-native,我碰巧有一个测试目标(即一个名为appTests的目标),并且仅在一个目标中切换团队是不够的,并导致此错误。 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! 1)在Xcode 9上,转到每个目标并更新团队!

2) Unfortunately, the next steps aren't very reliable from my experience, you might have to do your best to clean the caches. 2)不幸的是,根据我的经验,接下来的步骤不是很可靠,你可能必须尽力清理缓存。

3) Stop every single running scheme/application by using the stop button 3)使用停止按钮停止每个运行的方案/应用程序

4) Go to Product -> Clean and cleans every schemes you use. 4)转到产品 - >清洁并清理您使用的每个方案。

5) Quit and Restart Xcode 5)退出并重新启动Xcode

6) Run again and hopefully it works! 6)再次运行,希望它有效! 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. iOS Distribution证书只能用于构建将通过App Store安装的应用程序。

Thats a conflict of Xcode. 这是Xcode的冲突。 The way I solved it is by deleting the derived data of Xcode. 我解决它的方法是删除Xcode的派生数据。

Xcode > Preferences > Locations Xcode>首选项>位置

You will see an arrow right from the path of the DerivedData which will open them in finder. 您将在DerivedData的路径中看到一个箭头,它将在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. 当我还为myProjectTests添加正确的签名时,它可以正常工作。 This was the last thing I did after trying all sort of solutions for 5 hours. 这是我在尝试所有类型的解决方案5小时后做的最后一件事。

我通过在Xcode 10中将构建系统更改为legacy来解决它

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

我遵循了许多建议但是在我取消选中TESTS的自动签名之前它没有用

清除xcodeproj / project.pbxproj文件中的DEVELOPMENT_TEAM和DevelopmentTeam条目对我有用。

I'm on 8.2.1 and just had this same error. 我在8.2.1并且遇到了同样的错误。 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: 我通过打开我的xcodeproj / project.pbxproj并清空以下变量来解决:

DevelopmentTeam
DEVELOPMENT_TEAM

我们遇到了类似的问题:我们删除了单元测试,但它确实有效。

In my case, it was the problem when I setup my time manually two month earlier on my iPhone. 在我的情况下,当我两个月前在iPhone上手动设置时间时,问题就出现了。 But when I changed to set time automatically, it worked fine. 但是当我改变自动设置时间时,它工作正常。

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

GOTO:Targets-> yourProjectNameTest并验证该团队与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. 这非常特定于React Native项目,因为这是默认情况下配置项目的方式。

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. 然后在常规选项卡中禁用自动管理 xcode内的签名

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 . 我也有这个问题,对我来说解决方案是登录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. 有一个红色栏,就像“我们的TOS已经改变,你必须再次接受它们”,我做了,然后我的配置文件立即再次工作。

  • Step to be followed 要遵循的步骤
  • must have a developer account - https://developer.apple.com 必须有开发者帐户 - https://developer.apple.com
  • create a certificate for development 创建开发证书
  • Add devices with UDID 添加带有UDID的设备
  • add provisioning profile in development 在开发中添加配置文件
  • sign in Xcode with your account 使用您的帐户登录Xcode
  • clean build 干净的身材
  • Build with any destination choose device I have done for iphone 6 使用任何目的地构建选择我为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 首先禁用存档,通过从Xcode的右角选择通用ios设备来激活存档 - > yourAppName> generic ios device
  • once archive is done build for development not ADHOC 一旦归档完成构建开发而不是ADHOC
  • done DONE

I fixed it by setting in main Target / Build Settings / Section Signing 我通过在主Target / Build Settings / Section Signing中设置来修复它

Code signing Identity: Debug and Release set to IOS Developer 代码签名身份:调试和发布设置为IOS Developer

Code Signing Style: Automatic 代码签名样式:自动

Provision Profile: all automatic. 配置文件:全自动。

I set this exactly same for Test Target. 我为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. 顺便说一句,我不知道IOS Developer和iOS Distribution之间有什么区别。

在此输入图像描述

I had edited my app scheme Build Configuration from Debug to Release , and unchecked the Debug Executable . 我编辑了我的应用程序方案Build Configuration from Debug to Release ,并取消选中Debug Executable

I am not sure why, but if it makes a difference my signing details for Debug and Release were different. 我不确定为什么,但如果它有所作为,我的DebugRelease签名细节是不同的。 So after I reset those back to Debug and checked back the Debug Executable box, and all was fine again. 所以在我将它们重新设置回Debug并检查了Debug Executable框之后,一切都很好了。

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. 编辑:发现这是因为我试图通过App Store配置文件在我的手机上运行发布模式,App Store配置文件不允许这样做。 I switched to Ad Hoc and there is no more issues. 我转而使用Ad Hoc并没有更多问题。

Just upgrade to Xcode 8.1. 只需升级到Xcode 8.1即可。 It solves the problem. 它解决了这个问题。

我猜你已经尝试过了,但是我得到了同样的错误,并且Xcode的快速重启对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到此可执行文件的有效配置文件-Xcode 9? - A valid provisioning profile for this executable was not found - Xcode 9? Xcode 10:未找到此可执行文件的有效配置文件 - Xcode 10: A valid provisioning profile for this executable was not found 找不到此可执行文件的有效配置文件错误Xcode 9 - A valid provisioning profile for this executable was not found error Xcode 9 xcode“找不到此可执行文件的有效配置文件” - xcode “A valid provisioning profile for this executable was not found” 找不到有效的配置文件为此可执行文件 - Valid provisioning profile not found for this executable Xcode 7:应用程序安装失败:找不到此可执行文件的有效配置文件 - Xcode 7: App installation failed: A valid provisioning profile for this executable was not found Xcode,未找到此可执行文件的配置文件 - Xcode, no provisioning profile was found for this executable 找不到此可执行文件的有效配置文件:仅用于分发 - A valid provisioning profile for this executable was not found: only with distribution 错误:“找不到此可执行文件的有效配置文件” - Error: “A valid provisioning profile for this executable was not found” “找不到该可执行文件的有效配置文件” - “A valid provisioning profile for this executable could not be found”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM