xcode Xcode5“找不到匹配的配置文件问题”(但擅长 xcode4)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18475964/
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:53:38  来源:igfitidea点击:

Xcode5 "No matching provisioning profiles found issue" (but good at xcode4)

xcodeprovisioning-profile

提问by liangwang

Everything is OK on Xcode4.6. When I try to use Xcode5 dp6 to run app on devices. I got an error of "No matching provisioning profiles found issue". How can I resolve this issue?

在 Xcode4.6 上一切正常。当我尝试使用 Xcode5 dp6 在设备上运行应用程序时。我收到“找不到匹配的配置文件问题”的错误消息。我该如何解决这个问题?

enter image description here

在此处输入图片说明

回答by Danil

Don't forget to change profile in Provision Profile sections: enter image description here

不要忘记在 Provision Profile 部分更改配置文件: 在此处输入图片说明

Ideally you should see Automaticin Code Signing Identityafter you choose provision profile you need. If you don't see any option that's mean you don't have private key for current provision profile.

理想情况下,您应该AutomaticCode Signing Identity选择所需的配置文件后查看。如果您没有看到任何选项,则表示您没有当前配置文件的私钥。

回答by CommaToast

What really confused me was that there are two different sets of build settings: 1) for the Project 2) for the Target

真正让我困惑的是,有两组不同的构建设置:1)针对项目 2)针对目标

In the sidebar (top left) there is a blue icon that represents your project. Click that: enter image description here

在侧边栏中(左上角)有一个蓝色图标代表您的项目。点击那个: 在此处输入图片说明

Then in the main panel to the right, in the top bar, just to the left of the word, "General," there is a small icon of your Project. Click that, and now select the Target in the pop-up menu that appears:

然后在右侧的主面板中,在顶部栏中,就在“常规”一词的左侧,有一个项目的小图标。单击它,然后在出现的弹出菜单中选择目标:

the Target selection

目标选择

Once you've selected the Target, now the build settings for the target can be changed. They are different than the ones for the Project itself... weird! I'm not sure why there are build settings for the Project as a whole, that are different from the Target, since the Target's settings are what gets used during building. So why even have settings for the Project? Not sure.

选择目标后,现在可以更改目标的构建设置。它们与项目本身的不同......很奇怪!我不确定为什么整个项目的构建设置与目标不同,因为目标的设置是在构建过程中使用的。那么为什么还要为项目设置设置呢?没有把握。

But that's how you change them. This solved the issue for me: go into the Target (not the Project!) under Code Signing > Provisioning Profile >and change the settings to the proper profile. For a long time I was just changing them in the Project only, since I didn't know I was supposed to select the Target, and I kept having this issue. This fixes it!

但这就是你改变它们的方式。这为我解决了这个问题:进入代码签名> 配置文件>下的目标(而不是项目!)并将设置更改为正确的配置文件。很长一段时间我只是在项目中更改它们,因为我不知道我应该选择目标,而且我一直遇到这个问题。这解决了它!

回答by DBD

Setting your provisioning profile moved. It confounded me for a while until I found it also.

设置您的配置文件已移动。它让我困惑了一段时间,直到我也找到了它。

  1. Select your project file (to open target)
  2. Click on the "Build Settings" tab
  3. Scroll down to "Code Signing" and see the new "Provisioning Profile" section there.
  1. 选择您的项目文件(打开目标)
  2. 单击“构建设置”选项卡
  3. 向下滚动到“代码签名”并在那里看到新的“配置文件”部分。

enter image description here

在此处输入图片说明

回答by AlexVPerl

OK - all answers provided above are correct to some extend, but did not resolve this issue for me. I'm using Xcode5.

好的 - 上面提供的所有答案在某种程度上都是正确的,但没有为我解决这个问题。我正在使用 Xcode5。

There are lots of threads around this general error but from what I read this is a bug in Xcode dating back to 3.x versions that can randomly create conflicts with your Keychain.

关于这个一般错误有很多线索,但从我读到的这是 Xcode 中的一个错误,它可以追溯到 3.x 版本,它可以随机地与您的钥匙串产生冲突。

I was able to resolve this by doing the following:

我能够通过执行以下操作来解决此问题:

  1. Open Xcode -> preferences -> Accounts: delete your developer account

  2. Open Keychain: Select Keys, delete all iOS keys; Select My Certificates, delete all iPhone certificates

  3. Navigate to '/Users//Library/MobileDevice/Provisioning Profiles', delete all files (this is where Xcode stores mobile profiles)

  4. Open Xcode -> preferences -> Accounts: re-add your developer account

  5. Navigate to Project properties, Target, General Tab and you should see the following enter image description here

  6. Click 'Revoke and Request' (I tried this, it may take a few min) or 'Import Developer Profile' (or download from Apple developer portal and import this way, should be faster..)

  7. FINALLY: you can go over to Build Settings and set 'Provisioning Profile' and 'Signing Settings' as described by everyone here..

  1. 打开Xcode->首选项->账户:删除你的开发者账户

  2. 打开钥匙串:选择 Keys,删除所有 iOS 钥匙;选择我的证书,删除所有 iPhone 证书

  3. 导航到“/Users//Library/MobileDevice/Provisioning Profiles”,删除所有文件(这是 Xcode 存储移动配置文件的地方)

  4. 打开Xcode->首选项->账户:重新添加你的开发者账户

  5. 导航到项目属性、目标、常规选项卡,您应该看到以下内容 在此处输入图片说明

  6. 单击“撤销和请求”(我尝试过,可能需要几分钟)或“导入开发人员配置文件”(或从 Apple 开发人员门户下载并以这种方式导入,应该会更快..)

  7. 最后:您可以转到“构建设置”并按照此处所有人的描述设置“配置文件”和“签名设置”。

Doing this and only this resolved this error for me.

这样做,只有这样才能为我解决这个错误。

回答by guanhuiwit

Here's a simpler solution that worked for me:

这是一个对我有用的更简单的解决方案:

In XCode5, double-click on your app's target. This brings up the Info pane for the target. In the "Build Settings" section, check the "code signing" section for any old profiles and replace with the correct one. update the value of "code signing identity" and "provisioning profile"

在 XCode5 中,双击应用程序的目标。这将打开目标的信息窗格。在“构建设置”部分,检查任何旧配置文件的“代码签名”部分并替换为正确的配置文件。更新“代码签名身份”和“配置文件”的值

回答by Hunkpapa

Sometimes, especially after generating a new certificate or starting to use a new code signing identity, there seems to be no other way to fix this, other than doing some cleaning the .pbxproj file. This is probably a bug that will be fixed, so if you are reading this long after this post, maybe you should try some other solution.

有时,尤其是在生成新证书或开始使用新的代码签名身份之后,除了清理 .pbxproj 文件之外,似乎没有其他方法可以解决此问题。这可能是一个将被修复的错误,所以如果你在这篇文章之后很长时间阅读这篇文章,也许你应该尝试一些其他的解决方案。

There is an excellent post about this in the pixeldock blog: http://www.pixeldock.com/blog/code-sign-error-provisioning-profile-cant-be-found/

pixeldock 博客中有一篇关于此的精彩帖子:http://www.pixeldock.com/blog/code-sign-error-provisioning-profile-cant-be-found/

In short, mostly quoting from that article, you need to:

简而言之,主要是引用那篇文章,您需要:

  1. Make sure you have fetched all your remote iTunes Connect certificates in xcode5 from Preferences, Accounts, (select your account), View Details, press refresh button. (Normally, I answer no when xcode asks if I want to create certficate signing requests, it's not necessary when you only want to download/refresh your certificates)
  2. Close Xcode
  3. Right click on your project's .xcodeproj bundle to show it's contents.
  4. Open the .pbxproj file in a text editor of your choice (make a backup copy first if you feel paranoid)
  5. Find all lines in that file that include the word PROVISIONING_PROFILE and delete them.
  6. Open Xcode
  7. Enter your target and select the provisioning profile that you want to use.
  8. Build your project
  1. 确保您已从首选项、帐户、(选择您的帐户)、查看详细信息、按刷新按钮获取 xcode5 中的所有远程 iTunes Connect 证书。(通常,当 xcode 询问我是否要创建证书签名请求时,我会回答“否”,当您只想下载/刷新证书时则没有必要)
  2. 关闭 Xcode
  3. 右键单击项目的 .xcodeproj 包以显示其内容。
  4. 在您选择的文本编辑器中打开 .pbxproj 文件(如果您感到偏执,请先备份)
  5. 查找该文件中包含单词 PROVISIONING_PROFILE 的所有行并删除它们。
  6. 打开 Xcode
  7. 输入您的目标并选择您要使用的配置文件。
  8. 构建你的项目

Good luck!

祝你好运!

回答by zhidong

In xcode5 from Preferences, Accounts, (select your account), View Details, press refresh button. then select Provision Profile in build settings.

在 xcode5 中从首选项,帐户,(选择您的帐户),查看详细信息,按刷新按钮。然后在构建设置中选择 Provision Profile。

回答by Golden Thumb

In my case the "Fix Issue" button triggers a spinner for about 20 seconds and fixes nothing.

在我的情况下,“修复问题”按钮会触发一个微调器大约 20 秒,但没有修复任何问题。

This works for me (iOS 7 iPhone 5, Xcode 5):

这对我有用(iOS 7 iPhone 5,Xcode 5):

Xcode > Window > Organizer > Devices

Xcode > 窗口 > 管理器 > 设备

Find the connected device(with a green dot) on the left pane. Select "Provisioning Profiles" On the right pane, there is a line with warning. Delete this line.

在左侧窗格中找到连接的设备(带有绿点)。选择“Provisioning Profiles” 在右侧窗格中,有一行带有警告。删除此行。

Now go back to click the "Fix Issue" button and everything is fine - the app runs in the device as expected.

现在返回单击“修复问题”按钮,一切正常 - 应用程序按预期在设备中运行。

回答by mj662

I have 2 targets in my project, Free and Paid. My mistake was i was looking at my free target while trying to build the paid target, a stupid mistake but possible someone out there might learn from this as well.

我的项目中有 2 个目标,免费和付费。我的错误是我在尝试建立付费目标时正在查看我的免费目标,这是一个愚蠢的错误,但可能有人也可以从中学习。

回答by Mike Gledhill

I had the same error today, with XCode 6.1

我今天有同样的错误,使用 XCode 6.1

What I found was that, no matter what I tried, I couldn't get XCode to stop complaining about this Provisioning Profile with a GUID as its name.

我发现,无论我尝试什么,我都无法让 XCode 停止抱怨这个以 GUID 为名称的配置文件。

The solution was to search for this GUID in the .pbxprojfile, which lives within the XCode .xcodeprojfolder.

解决方案是在 . pbxproj文件,它位于 XCode 中。xcodeproj文件夹。

Just find the line containing your GUID:

只需找到包含您的 GUID 的行:

PROVISIONING_PROFILE = "A9234343-.....34"

and change it to:

并将其更改为:

PROVISIONING_PROFILE = ""

One other thing to check: Your XCode PROJECT settings contain your Provisioning Profile & Code Signing settings, but, there is a second setunder your project's "TARGETS" tab.

要检查的另一件事:您的 XCode PROJECT 设置包含您的配置文件和代码签名设置,但是,在您项目的“目标”选项卡下还有第二个设置

So, if XCode is complaining about a Provisioning Profile which isn't the one quoted in your project settings, then go have have a look at the settings shown under "TARGETS" in your XCode project.

因此,如果 XCode 抱怨的配置文件不是在您的项目设置中引用的配置文件,那么请查看您的 XCode 项目中“目标”下显示的设置。

(I wish someone had given me this advice, 4 painful hours ago..)

(我希望有人在痛苦的 4 小时前给了我这个建议……)