xcode 找不到此可执行文件的有效配置文件...(再次)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14727655/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:43:34  来源:igfitidea点击:

A valid provisioning profile for this executable was not found... (again)

xcodecertificateprovisioning-profile

提问by Robert

I know this has been asked and answered multiple times but I'm tearing my hair out as none of the proposed solutions appears to work.

我知道这已经被多次询问和回答,但我正在撕毁我的头发,因为提出的解决方案似乎都不起作用。

enter image description here

在此处输入图片说明

I receive the above error, despite having a valid provisioning profile which, as far as I can tell matches the bundle identifier:

尽管有一个有效的配置文件,据我所知匹配包标识符,但我收到了上述错误:

enter image description here

在此处输入图片说明

I've followed the steps in various suggested solutions on this site, including deleting all existing certificates and starting again, as suggested hereand here.

我已按照此站点上各种建议解决方案中的步骤进行操作,包括删除所有现有证书并重新开始,如此此处所建议的。

One thing I have noticed is that the profile doesn't show up in the code signing lists, either for target or project.

我注意到的一件事是配置文件没有出现在代码签名列表中,无论是目标还是项目。

Can anyone offer any further suggestions?

任何人都可以提供任何进一步的建议吗?

回答by John Starr Dewar

This happened to me yesterday. What happened was that when I added the device Xcode included it in the wrong profile by default. This is easier to fix now that Apple has updated the provisioning portal:

这昨天发生在我身上。发生的情况是,当我添加设备时,Xcode 默认将其包含在错误的配置文件中。由于 Apple 已更新配置门户,因此更容易解决此问题:

  1. Log in to developer.apple.com/ios and click Certificates, Identifiers & Profiles
  2. Click devices and make sure that the device in question is listed
  3. Click provisioning profiles > All and select the one you want to use
  4. Click the edit button
  5. You will see another devices list which also has a label which will probably say "3 of 4 devices selected" or something of that nature.
  6. Check the select all box or scroll through the list and check the device. If your device was unchecked, this is your problem.
  7. Click "Generate"
  8. DON'Thit Download & Install – while this will work it's likely to screw up your project file if you've already installed the provisioning profile (see this questionfor more info).
  9. Open Xcode, open the Organizer, switch to the Devices tab, and hit the Refresh button in the lower right corner. This will pull in the changes to the provisioning profile.
  1. 登录 developer.apple.com/ios 并单击证书、标识符和配置文件
  2. 单击设备并确保列出了相关设备
  3. 单击配置文件 > 全部并选择您要使用的配置文件
  4. 点击编辑按钮
  5. 您将看到另一个设备列表,其中也有一个标签,可能会显示“选择了 4 个设备中的 3 个”或类似的内容。
  6. 选中全选框或滚动列表并检查设备。如果您的设备未选中,则这是您的问题。
  7. 点击“生成”
  8. 不要点击下载和安装 - 虽然这会起作用,但如果您已经安装了配置文件,它可能会搞砸您的项目文件(有关更多信息,请参阅此问题)。
  9. 打开 Xcode,打开 Organizer,切换到 Devices 选项卡,然后点击右下角的 Refresh 按钮。这将引入对配置文件的更改。

Now it should work.

现在它应该可以工作了。

回答by Alpana

If none of above stated works then check for your device date, make sure your device date doesn't exceed profile expiry date i.e. not set to far future.

如果上述均无效,请检查您的设备日期,确保您的设备日期不超过配置文件到期日期,即未设置为远期。

回答by kmiklas

+1 to banging my head against the wall for a day or two...

+1 把我的头撞在墙上一两天......

Also check this setting:

还要检查此设置:

Build Settings -> Code Signing -> Provisioning Profile

构建设置 -> 代码签名 -> 配置文件

After following the above steps, "Automatic" setting worked for me. ~kjm~

按照上述步骤操作后,“自动”设置对我有用。~kjm~

回答by Abhishek

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

回答by Adam

Xcode5 has broken this again(congratulations to Apple for failing to bother testing one of their buggiest bits of code. Again).

Xcode5再次打破了这一点(祝贺 Apple 未能费心测试他们最有缺陷的代码之一。再次)。

A new way to break/fix it:

一种打破/修复它的新方法:

If you have:

如果你有:

  1. An old profile on your device (team profile, or non-team profile)
  2. A new profile generated automatically on the App Store, by any copy of Xcode5, even if it's simply an update to the profile you already had
  3. (NB: if any colleagueadds themself to the profile, this triggers the above "change")
  4. You use the new "Accounts" dialog to download profiles (NB: this is now REQUIRED by Apple for various situations - all other approaches, including manual download, appear to be unsupported. Even though the Apple Developer site TELLS YOU TO MANUALLY DOWNLOAD! Don't do it! It breaks Xcode5!)
  5. Xcode5 will INCORRECTLY hide AND RENAME that profile in the drop-down selector in Build Settings
  6. (I detest this drop-down. Some idiot at Apple keeps removing information from it, and someone else keeps adding it back, it flip-flops between Xcode point releases. WHY??!?!)
  7. There is NO WAY you can select the correct profile - whatever you select, Xcode5 will use the wrong one
  1. 您设备上的旧配置文件(团队配置文件或非团队配置文件)
  2. 通过任何 Xcode5 副本在 App Store 上自动生成的新配置文件,即使它只是对您已有的配置文件的更新
  3. (注意:如果有同事将自己添加到个人资料中,则会触发上述“更改”)
  4. 您使用新的“帐户”对话框下载配置文件(注意:Apple 现在针对各种情况要求这样做 - 所有其他方法,包括手动下载,似乎都不受支持。尽管 Apple 开发者网站告诉您要手动下载!Don不要这样做!它会破坏 Xcode5!)
  5. Xcode5 将在 Build Settings 的下拉选择器中错误地隐藏和重命名该配置文件
  6. (我讨厌这个下拉菜单。Apple 的一些白痴不断从中删除信息,而其他人不断添加它,它会在 Xcode 点发布之间翻转。为什么??!?!)
  7. 您无法选择正确的配置文件 - 无论您选择什么,Xcode5 都会使用错误的配置文件

The solution is easy enough. The "Apple engineering are lazy" solution:

解决方案很简单。“苹果工程师懒惰”的解决方法:

  1. Go to Xcode5 -> Window -> Organizer -> Devices
  2. Select your device
  3. Select provisioning profiles
  4. Delete everything relating to your current project and/or Team (even other projects, if necessary - they can all be downloaded later if still needed!)
  5. Re-build.
  6. You should get an error from Xcode5 that the profile doesn't exist. Even though you manually had seleted the profile that was ALREADY PRESENT on your machine (yep - that dropdown is buggy again. It lies about the profile it selects behind the scenes!)
  7. In the profile selector, select the "real" profile
  8. Build, run - success!
  1. 转到 Xcode5 -> 窗口 -> 管理器 -> 设备
  2. 选择您的设备
  3. 选择配置文件
  4. 删除与您当前项目和/或团队相关的所有内容(甚至其他项目,如有必要 - 如果仍然需要,可以稍后下载!)
  5. 重建。
  6. 您应该从 Xcode5 收到一个错误,说明该配置文件不存在。即使您手动选择了机器上已经存在的配置文件(是的 - 该下拉菜单再次出错。它与它在幕后选择的配置文件有关!)
  7. 在配置文件选择器中,选择“真实”配置文件
  8. 构建,运行 - 成功!

回答by the Reverend

It happened to me when I accidentally left the build in release mode.

当我不小心将构建置于发布模式时,它发生在我身上。

回答by bhoomi

This can happen if your provisioning profile has expired. Another reason could be that you device date exceeds the expiry date of your provisioning profile. Please make sure that your device date is correct.

如果您的配置文件已过期,就会发生这种情况。另一个原因可能是您的设备日期超过了配置文件的到期日期。请确保您的设备日期正确。

回答by Manish

After spending the day I realized it was a simple change in Project Settings

花了一天后,我意识到这是项目设置中的一个简单更改

File -> Project Settings... -> Build System -> Legacy Build System.

文件 -> 项目设置... -> 构建系统 -> 传统构建系统。

In a project setting, you will see Build System named drop down and in that drop down select Legacy Build System

在项目设置中,您将看到名为 Build System 的下拉菜单,并在该下拉菜单中选择 Legacy Build System

回答by BHIMA PATANGE

  1. Delete all certificates from the keychain of the account which you are trying to use provisioning profile
  2. Delete Derived data
  3. Clean the folder(cmd+sht+alt+k)
  4. Clean the project(cmd+sht+k)
  5. Build & Run
  1. 从您尝试使用配置文件的帐户的钥匙串中删除所有证书
  2. 删除派生数据
  3. 清理文件夹(cmd+sht+alt+k)
  4. 清理项目(cmd+sht+k)
  5. 构建和运行

回答by Xcodian Solangi

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.

就我而言,这是我两个月前在 iPhone 上手动设置时间时出现的问题。但是当我更改为自动设置时间时,它工作正常。

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

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

If it does not work then set time automatically of both mac & iPhone, it may work fine.

如果它不起作用然后自动设置 mac 和 iPhone 的时间,它可能会正常工作。