xcode “找不到与应用程序标识符‘’匹配的有效配置文件”错误

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

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

xcodeprovisioning-profile

提问by BloonsTowerDefence

I am working on an app that I would like to put onto some iPads (not the App Store). I bought the developer license, and added the provisions on Xcode. Now when I try to build the app for the iPad which I have connected to my computer, I get the error:

我正在开发一个应用程序,我想把它放到一些 iPad 上(不是 App Store)。我购买了开发者许可证,并在 Xcode 上添加了规定。现在,当我尝试为已连接到计算机的 iPad 构建应用程序时,出现错误:

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

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

I think that this problem has been caused because I have two different teams running on my Xcode, and I don't know how to specify the correct one (one has expired). Also, I remember when I first created my App that I didn't really pay attention to the fields like 'Company Name', can I change those now?

我认为这个问题是因为我有两个不同的团队在我的 Xcode 上运行,我不知道如何指定正确的一个(一个已经过期)。另外,我记得当我第一次创建我的应用程序时,我并没有真正关注像“公司名称”这样的字段,我现在可以更改吗?



EDIT: Here are the provisions I do have:

编辑:这是我确实有的规定:

enter image description here

在此处输入图片说明

采纳答案by Dustin

This is a very common (to me at least) error. It sounds like you just don't have a mobile provision for the app you're trying to put on your iPad. You need a .mobileprovision file for each app identifier. As for the various names of things, you can edit them in the info tab of your project or in info.plist.

这是一个非常常见的(至少对我而言)错误。听起来您只是没有为您尝试放在 iPad 上的应用程序提供移动设备。每个应用标识符都需要一个 .mobileprovision 文件。至于事物的各种名称,您可以在项目的信息选项卡或 info.plist 中编辑它们。

If one of your profiles has expired then delete it, although this shouldn't affect anything.

如果您的配置文件之一已过期,请将其删除,尽管这不会影响任何内容。

To get a provision for your app, go to the apple provisioning portal and add a provisioning profile. Then you just have to put all of the specifications (UDID, development cert, application ID) in and it'll kick out a provision. There's a how-to guide on the apple developer site for both making provisions and putting them where they're supposed to be.

要获取应用的配置,请转到 Apple 配置门户并添加配置文件。然后你只需要输入所有的规范(UDID、开发证书、应用程序 ID),它就会踢出一个规定。苹果开发人员网站上有一个操作指南,用于制定规定并将其放置在应有的位置。

For some reason it also looks like your app's identifier is empty; you can change this in your project's info tab. The .mobileprovision app ID and your app's ID have to match EXACTLY otherwise nothing works.

出于某种原因,您的应用程序的标识符看起来也为空;您可以在项目的信息选项卡中更改此设置。.mobileprovision 应用 ID 和您的应用 ID 必须完全匹配,否则将无效。

回答by dushshantha

I had the same issue when i first installed the provisioning profile on the XCode. i'm using Xcode 4.5.* version. Although I installed the prov profile and certs in my mac, when i go to the Devices tab in the organizer in Xcode and clicked my device, i still couldn't see the new provisioning profile was added to the device. So I clicked the "Add to Portal" button with a + mark on it. It did the trick and i was able to test my app successfully without any errors about missing prov profile. Hope this helps for some of you with the issue i had.

当我第一次在 XCode 上安装配置文件时,我遇到了同样的问题。我正在使用 Xcode 4.5.* 版本。尽管我在 Mac 中安装了 prov 配置文件和证书,但当我转到 Xcode 管理器中的“设备”选项卡并单击我的设备时,我仍然看不到新的配置文件已添加到设备中。因此,我单击了带有 + 标记的“添加到门户”按钮。它成功了,我能够成功测试我的应用程序,而没有任何关于缺少 prov 配置文件的错误。希望这可以帮助你们中的一些人解决我遇到的问题。

enter image description here

在此处输入图片说明

回答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 开发人员:您的姓名 ()”键对您的应用程序进行签名。

回答by Norbert Bicsi

As Dustin said:

正如达斯汀所说:

The .mobileprovision app ID and your app's ID have to match EXACTLY otherwise nothing works.

.mobileprovision 应用 ID 和您的应用 ID 必须完全匹配,否则将无效。

In your info.plist XCode automatically sets the 'Bundle identifier' to something like: com.domainname.applicationname${PRODUCT_NAME:rfc1034identifier}

在您的 info.plist XCode 自动将“捆绑标识符”设置为类似:com.domainname.applicationname${PRODUCT_NAME:rfc1034identifier}

Delete the '${PRODUCT_NAME:rfc1034identifier}' and leave only 'com.domainname.applicationname' so that it exactly matchesyour provisioning profile ID.

删除“${PRODUCT_NAME:rfc1034identifier}”并仅保留“com.domainname.applicationname”,使其您的配置文件 ID完全匹配

This worked for me when I had the same issue. Hope it helps.

当我遇到同样的问题时,这对我有用。希望能帮助到你。

回答by Kursat Turkay

This progress is a chaos. the hardest issue in the universe and the world I think. it should be simple. in xcode5 "fix issues" button doesn't fix issues. but hey ! this isnt take a day. but some hours to fix.

这种进展是混乱的。我认为宇宙和世界上最难的问题。它应该很简单。在 xcode5 中“修复问题”按钮不能修复问题。但是嘿!这不是需要一天的时间。但需要几个小时来修复。