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

时间:2023-01-16 20:23:50

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 have a valid Apple Developer account with program active.

    我有一个有效的Apple Developer帐户,程序处于活动状态。

  • I have tried using managed and unmanaged provisioning with new/fresh bundle ID's (which get recreated provisioning profiles).

    我尝试使用托管和非托管配置使用新/新捆绑ID(可以重新创建配置文件)。

  • I have tried this: A valid provisioning profile for this executable was not found for debug mode

    我试过这个:在调试模式下找不到此可执行文件的有效配置文件

  • I have tried this: XCode :7 App installation failed :A valid provisioning profile for this executable was not found

    我试过这个:XCode:7 App安装失败:找不到此可执行文件的有效配置文件

  • I have deleted any old versions of the app from my phone.

    我已从手机中删除了该应用的任何旧版本。

  • I have confirmed my device ID on the developer portal is the same as in Xcode (was also useful for manual provisioning profile management to confirm)

    我已确认开发人员门户网站上的设备ID与Xcode中的相同(对于手动配置配置文件管理也很有用)

  • I even tried another developer ID I have out of sheer desperation and yet the same error appears.

    我甚至尝试了另一个开发者ID,我已经绝望了,但是出现了同样的错误。

  • I even get this error when building for release scheme with my valid distribution certificate.

    在使用我的有效分发证书构建发布方案时,我甚至会收到此错误。

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.

更新2:我放弃了尝试解决这个问题,我创建了一个新项目并将源文件复制到新项目中,现在我已经开始工作了。很明显,项目配置/设置文件中的某些内容在之前的项目中以某种方式被破坏,没有明显的修复可用。将这个问题保持开放,也许有人最终会有一个解决方案。我有一个旧的“非工作”项目,所以将继续尝试那些只是为了好奇。

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

Before this error message, Build Succeeded is shown.

在此错误消息之前,将显示Build Succeeded。

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

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

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

12 个解决方案

#1


29  

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安装的应用程序。

#2


18  

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

这是Xcode的冲突。我解决它的方法是删除Xcode的派生数据。

Xcode > Preferences > Locations

Xcode>首选项>位置

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

您将在DerivedData的路径中看到一个箭头,它将在finder中打开它们。只需删除文件夹中的所有内容。

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

更新:根据钱德勒的评论检查是否需要删除测试目标。

#3


14  

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.

由于我正在使用react-native,我碰巧有一个测试目标(即一个名为appTests的目标),并且只在一个目标中切换团队是不够的,并导致此错误。此错误信息不足以让您知道其中一个目标中存在错误,因此导致我自己的调试时间较长。

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! If not, it's likely some cache are still present.

6)再次运行,希望它有效!如果没有,可能仍然存在一些缓存。

#4


5  

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.

当我还为myProjectTests添加正确的签名时,它可以正常工作。这是我在尝试所有类型的解决方案5小时后做的最后一件事。

#5


4  

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

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

#6


2  

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.

我在8.2.1并且遇到了同样的错误。删除原始项目文件夹并重新创建它无缝地工作。我验证了所有签名和配置证书与上一个项目完全相同。我不确定问题出在哪里,但我相信你对损坏文件的假设是准确的。

#7


2  

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

#8


2  

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

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

#9


2  

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

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

#10


0  

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

GOTO:Targets-> yourProjectNameTest并验证该团队与yourProjectName上的团队相同

#11


-1  

Just upgrade to Xcode 8.1. It solves the problem.

只需升级到Xcode 8.1即可。它解决了这个问题。

#12


-1  

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

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

#1


29  

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安装的应用程序。

#2


18  

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

这是Xcode的冲突。我解决它的方法是删除Xcode的派生数据。

Xcode > Preferences > Locations

Xcode>首选项>位置

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

您将在DerivedData的路径中看到一个箭头,它将在finder中打开它们。只需删除文件夹中的所有内容。

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

更新:根据钱德勒的评论检查是否需要删除测试目标。

#3


14  

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.

由于我正在使用react-native,我碰巧有一个测试目标(即一个名为appTests的目标),并且只在一个目标中切换团队是不够的,并导致此错误。此错误信息不足以让您知道其中一个目标中存在错误,因此导致我自己的调试时间较长。

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! If not, it's likely some cache are still present.

6)再次运行,希望它有效!如果没有,可能仍然存在一些缓存。

#4


5  

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.

当我还为myProjectTests添加正确的签名时,它可以正常工作。这是我在尝试所有类型的解决方案5小时后做的最后一件事。

#5


4  

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

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

#6


2  

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.

我在8.2.1并且遇到了同样的错误。删除原始项目文件夹并重新创建它无缝地工作。我验证了所有签名和配置证书与上一个项目完全相同。我不确定问题出在哪里,但我相信你对损坏文件的假设是准确的。

#7


2  

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

#8


2  

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

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

#9


2  

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

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

#10


0  

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

GOTO:Targets-> yourProjectNameTest并验证该团队与yourProjectName上的团队相同

#11


-1  

Just upgrade to Xcode 8.1. It solves the problem.

只需升级到Xcode 8.1即可。它解决了这个问题。

#12


-1  

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

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