xcode 找不到与应用程序标识符 '' 匹配的有效配置文件

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

A valid provisioning profile matching the application's Identifier '' could not be found

objective-ciosxcodeipadprovisioning-profile

提问by Tim

Hello all I am new to the Xcode etc... I made a app now I am trying to distribute it ad-hoc I paid for the enterprise license, I see this is a problem with other people I just am too new to find out what to change. A valid provisioning profile matching the application's Identifier '4R7B8RY6Z1.com.LaneBob' could not be found is the error I created a provisioning profile '4R7B8RY6Z1.com.LaneBob.*' what do I change in the code or Xcode to fix this so I can build it? I am building to archive not to a device so I am not sure what to do.

大家好,我是 Xcode 的新手等等......我现在制作了一个应用程序 我正在尝试临时分发它 我为企业许可证支付了费用,我看到这是其他人的问题 我只是太新而无法找出要改变什么。找不到与应用程序标识符“4R7B8RY6Z1.com.LaneBob”匹配的有效配置文件是错误我创建了配置文件“4R7B8RY6Z1.com.LaneBob.*”我在代码或Xcode中更改了什么来解决这个问题,所以我可以建吗?我正在构建而不是存档到设备,所以我不知道该怎么做。

Thanks for any help!

谢谢你的帮助!

EDITI have checked these places:

编辑我检查了这些地方:

1) info.plist Make sure that your Bundle identifier matches what you have in your Provisioning portal. It should have what you entered online, not the yourcompanyname stuff.

1) info.plist 确保您的 Bundle 标识符与您在 Provisioning 门户中的标识符相匹配。它应该包含您在线输入的内容,而不是您的公司名称。

2) Your target Right click on your build target and select "get info". And then under the Build tab, find the Code Signing section. There should be one item that says Code Signing Identity. This is where you pick which signing identity to sign with and you want to make sure it matches the intended provisioning profile. If you don't see your provisioning profile listed, you didn't install it correctly. Your provisioning profile needs to be installed on the device for it to run, and in Xcode so it can sign the app with the provisioning profile.

2)您的目标右键单击您的构建目标并选择“获取信息”。然后在 Build 选项卡下,找到 Code Signing 部分。应该有一项说代码签名身份。您可以在此处选择使用哪个签名身份进行签名,并且您希望确保它与预期的配置文件匹配。如果您没有看到您的配置文件列出,则您没有正确安装它。您的配置文件需要安装在设备上才能运行,并在 Xcode 中安装,以便它可以使用配置文件对应用程序进行签名。

Still not working

还是行不通

采纳答案by DarthMike

For your two points:

对于你的两点:

1) You should have com.LaneBob.yourappName in the info.plist file. For Ad-hoc distribution you can't have 'generic' names with wildcard characters. You don't need the beginning HASH part (4R7B8RY6Z1. in your case)

1) 你应该在 info.plist 文件中有 com.LaneBob.yourappName。对于临时分发,您不能使用带有通配符的“通用”名称。您不需要开头的 HASH 部分(在您的情况下为 4R7B8RY6Z1.)

2)You pick code signing identity in XCode target preferences. 'LEFT' click on project, then go to the target of your app. Inside there, there are 'code signing identity' for different configurations. When you build and archive you typically build release mode and use distribution certificate.

2)您在 XCode 目标首选项中选择代码签名身份。'LEFT' 单击项目,然后转到您的应用程序的目标。在那里,有不同配置的“代码签名身份”。当您构建和存档时,您通常会构建发布模式并使用分发证书。

All this can not solve your problem if you don't have provisioning profile installed in your mac. Just download it from the portal and double click on it to install it. Also with newer XCode you can just download all provisioning portals from organizer, by entering the user/password there.

如果您的 Mac 中没有安装配置文件,所有这些都无法解决您的问题。只需从门户下载它并双击它进行安装。此外,使用较新的 XCode,您只需在组织者那里输入用户/密码即可从组织者下载所有配置门户。

Incidentally, I found you need to restart xcode sometimes to 'get' the keychain updates.

顺便说一句,我发现您有时需要重新启动 xcode 才能“获取”钥匙串更新。

Hope it helps!

希望能帮助到你!

回答by Morgan Wilde

I had the same error message when I was trying to build an app on my iPhone. Everything seemed to be in order, I.e. the certificates were all valid and present and so on, but I just couldn't get it to work.

当我尝试在 iPhone 上构建应用程序时,我收到了同样的错误消息。一切似乎都井井有条,即证书都是有效的并且存在等等,但我无法让它工作。

I just couldn't find the option "iOS team provisioning profile" in Project> Build Settings> Code Signing> Code Signing Identity- this was the main clue to a solution. If you can't see that option there, check your Xcode Organizer.

我只是在“项目”>“构建设置”> “代码签名”> “代码签名标识”中找不到“iOS 团队配置文件”选项——这是解决方案的主要线索。如果您在那里看不到该选项,请检查您的 Xcode Organizer

Inside it, go to Library> Provisioning Profiles:

在其中,转到Library> Provisioning Profiles

prov profiles

证明资料

Now what you shouldsee if everything were right is this:

现在,如果一切正常,您应该看到的是:

if all is well

如果一切顺利

But if on the other hand you see an empty list, click the Refreshbutton in the lower right corner of the Organizer:

但如果另一方面您看到一个空列表,请单击管理器右下角的刷新按钮:

enter image description here

enter image description here

After said procedure, Xcode started churning out wonderful messages of "adding" and "finishing" and then my app appeared on my iPhone. The End.

完成上述过程后,Xcode 开始生成“添加”和“完成”的精彩消息,然后我的应用程序出现在我的 iPhone 上。结束。

Good luck!

祝你好运!

回答by user2015453

In my case, I had to first BUILD the app with Cmd-B.

就我而言,我必须首先使用 Cmd-B 构建应用程序。

This popped up a keychain window access asking me to "Allow" (or "Always Allow") Xcode to access the keychain.

这会弹出一个钥匙串窗口访问,要求我“允许”(或“始终允许”)Xcode 访问钥匙串。

Only THEN could I actually run the program to launch it on my iPhone.

只有那时我才能真正运行该程序以在我的 iPhone 上启动它。

Apparently, hitting only run didn't do the trick.

显然,只打跑步并不能解决问题。

(Btw, remember to first sign your app with the "iPhone Developer: Your Name ()" key.

(顺便说一句,请记住首先使用“iPhone 开发人员:您的姓名 ()”键对您的应用程序进行签名。