Xcode 5:“找不到这样的配置文件......”错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21378130/
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
Xcode 5: "No such provisioning profile was found ..." error
提问by Luis
I'm trying to distribute a new version of the app (it can be installed OTA) and I got the error:
我正在尝试分发应用程序的新版本(可以通过 OTA 安装),但出现错误:
"Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “AdHocProfile”, however, no such provisioning profile was found.
"and Xcode gets stuck in the process of automatically fix the error:
“代码签名错误:找不到匹配的配置文件:您的构建设置指定了一个带有 UUID“AdHocProfile”的配置文件,但是,没有找到这样的配置文件。”并且 Xcode 卡在自动修复错误的过程中:
I have spent a lot of hours in the weekend looking for a solution here and on the internet, only to get rid of one of the two errors I got when I tried to archive the app to distribute it "Ad Hoc".
我在周末花了很多时间在这里和互联网上寻找解决方案,只是为了摆脱当我尝试存档应用程序以“临时”分发它时遇到的两个错误之一。
I made some capture screens to clarify what I've done:
我制作了一些捕获屏幕来阐明我所做的事情:
Provisioning profile at Developer site:
开发人员站点上的配置文件:
My account: certificates and profiles:
我的帐户:证书和配置文件:
Project Settings:
项目设置:
Target Settings (Xcode changed them when I deleted the line PROVISIONING_PROFILE in project.pbxproj):
目标设置(当我删除 project.pbxproj 中的 PROVISIONING_PROFILE 行时,Xcode 更改了它们):
I deleted the line containing PROVISIONING_PROFILE in project.pbxproj, following the directions found in posts similar to this
我删除含有PROVISIONING_PROFILE在project.pbxproj线,以类似于发现帖子中的说明本
I also removed both the stable and the beta versions of Xcode and reinstalled it from the App Store. Don't know if it's important, but I removed the beta 5.1.3 with App Cleaner, deleting all the files associated to it.
我还删除了 Xcode 的稳定版和测试版,并从 App Store 重新安装了它。不知道这是否重要,但我使用 App Cleaner 删除了 beta 5.1.3,删除了与其关联的所有文件。
Since Xcode does not longer show the values on the popup to choose certificates, I am not sure if I choose the correct ones.
由于 Xcode 不再在弹出窗口中显示用于选择证书的值,因此我不确定我是否选择了正确的值。
Could you please help me to solve this issue?
你能帮我解决这个问题吗?
采纳答案by Luis
Well, I solved this issue going back to a previous version stored in Time Machine, deleting all certificates and profiles both on Developer website and computer, deleted files in ~Library/MobileDevice/Provisioning Profiles and the certificates stored in Keychain Access. Also checked in project.pbxproj that no PROVISIONING_PROFILE was set.
好吧,我解决了这个问题,回到存储在 Time Machine 中的先前版本,删除了开发者网站和计算机上的所有证书和配置文件,删除了 ~Library/MobileDevice/Provisioning Profiles 中的文件以及存储在 Keychain Access 中的证书。还检查了 project.pbxproj 没有设置 PROVISIONING_PROFILE。
Then, I loaded the old version in Xcode and I was able to build and archive it.
然后,我在 Xcode 中加载了旧版本,我能够构建和存档它。
After that, the newest version worked again.
之后,最新版本再次运行。
By the way, if you try to distribute an app to a device running iOS 7.1, read this
顺便说一句,如果您尝试将应用分发到运行 iOS 7.1 的设备,请阅读此内容
回答by villy393
This took me a long time to figure out. I wasn't keen to redo all my profiles and certificates like some of the people suggested. My error message was saying ""Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “6278e001-8887-4fe4-a95c-a722c896792f”" but then when I went into ~/Library/MobileDevice/Provisioning\ Profiles
and printed out all the files using ls -la
I could clearly see the profile there.
这花了我很长时间才弄明白。我并不热衷于像某些人建议的那样重做我所有的个人资料和证书。我的错误消息是“” “代码签名错误:找不到匹配的配置文件:您的构建设置指定了一个带有 UUID“6278e001-8887-4fe4-a95c-a722c896792f”的配置文件“但是当我进入~/Library/MobileDevice/Provisioning\ Profiles
并打印出所有文件使用ls -la
我可以清楚地看到那里的配置文件。
I tried doing a Clean
and Clean Build Folder...
. I then tried to remove derived data. None of this worked.
我试着做一个Clean
and Clean Build Folder...
。然后我尝试删除派生数据。这些都没有奏效。
But then when I simply quit Xcode and opened it again it worked
但是当我简单地退出 Xcode 并再次打开它时,它就起作用了
Xcode must be storing a cache somewhere when it opens up. This seems crazy to me. But what can we do.
Xcode 在打开时必须在某处存储缓存。这对我来说似乎很疯狂。但是我们能做什么。
I hope this helps someone.
我希望这可以帮助别人。
回答by Mike Gledhill
I had the same issue this morning, and wasted about two hours desperately trying to fix it.
我今天早上遇到了同样的问题,浪费了大约两个小时拼命地试图解决它。
"Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID "0C60982A-9F45-4737-8135-505126A6DC2E", however, no such provisioning profile was found. "
“代码签名错误:找不到匹配的配置文件:您的构建设置指定了一个 UUID 为“0C60982A-9F45-4737-8135-505126A6DC2E”的配置文件,但是,没有找到这样的配置文件。”
What I learned is this:
我学到的是:
If XCode ever reports that it can't find a Provisioning Profile, but just quotes the GUID, then give up trying to use your initiative, create new Profiles or Certificates, and get ready to hack.
如果 XCode 报告它无法找到配置文件,而只是引用了 GUID,那么就放弃尝试使用您的主动性,创建新的配置文件或证书,并准备好入侵。
The onlyway I could stop this error from happening (even after adding valid Provisioning Profiles) was to manually edit the .pbxproj file within the *.xcodeproj package.
我可以阻止此错误发生的唯一方法(即使在添加有效的配置文件之后)是手动编辑 *.xcodeproj 包中的 .pbxproj 文件。
Do a search for the GUID within this file, strip it out, and finally - finally - XCode will stop complaining.
在此文件中搜索 GUID,将其删除,最后 - 最后 - XCode 将停止抱怨。
Seriously, this is 2014, why is Apple's development environment such a dinosaur ?
说真的,现在是 2014 年,为什么苹果的开发环境如此恐龙?
Year after year, it's just bad... and they prefer to add a second programming language to it, rather than actually improve its usability.
年复一年,这很糟糕……他们更愿意向其中添加第二种编程语言,而不是真正提高其可用性。
(Sorry.. I'm in a bad mood after wasting my morning on this...)
(抱歉……浪费了早上的时间心情不好……)
回答by Liam
Quit Xcode and re-open, this worked for me. Would try first before spending too long attempting to fix it.
退出 Xcode 并重新打开,这对我有用。在花费太长时间尝试修复它之前会先尝试。
回答by Vishal Chandran
I was able to get a fix done just by doing the following:
我只需执行以下操作即可完成修复:
- Xcode -> Preferences
- Accounts
- Select your Apple ID and remove it by clicking the '-' button at the bottom
- Click the '+' button at bottom -> Add Apple ID
- Login with your Apple ID
- Download all certificates again
- Specify your profiles in your Build Settings
- Build
- Xcode -> 首选项
- 帐户
- 选择您的 Apple ID,然后单击底部的“-”按钮将其删除
- 单击底部的“+”按钮 -> 添加 Apple ID
- 使用您的 Apple ID 登录
- 重新下载所有证书
- 在您的构建设置中指定您的配置文件
- 建造
回答by Umesh Sawant
Considering everything you set properly still facing issue. Then Just delete all derived data for your project , quit XCode then open your project again.
考虑到您正确设置的所有内容仍然面临问题。然后只需删除项目的所有派生数据,退出 XCode,然后再次打开您的项目。
It workes for me.
它对我有用。
回答by Groot
I got this issue running Xcode 7.2.1 and found out that I had multiple provisioning profiles with the same name (The name on the developer portal).
我在运行 Xcode 7.2.1 时遇到了这个问题,并发现我有多个同名的配置文件(开发人员门户上的名称)。
By navigating to ~/Library/MobileDevice/Provisioning Profiles and removing all old provisioning profiles with the same name I was able to solve this problem.
通过导航到 ~/Library/MobileDevice/Provisioning Profiles 并删除所有具有相同名称的旧配置文件,我能够解决这个问题。
In the terminal, navigate to the provisioning profile folder:
在终端中,导航到配置文件文件夹:
cd ~/Library/MobileDevice/Provisioning\ Profiles
List all provisioning profiles with your name:
列出所有带有您姓名的配置文件:
grep -ar 'MyProvisioningProfileName' .
-a
means that we treat all files as ASCII text.
-a
意味着我们将所有文件都视为 ASCII 文本。
-r
means that we will search all subdirectories listed.
-r
意味着我们将搜索列出的所有子目录。
This should produce a list of all provisioning profiles with the same name, e.g.
这应该会生成具有相同名称的所有配置文件的列表,例如
./123ha32ba-b5df-abee-12yb-12a34b216ba8.mobileprovision: <string>MyProvisioningProfileName</string>
./214hj32cf-bdfh-1ebe-bba4-7ba32b2165ha.mobileprovision: <string>MyProvisioningProfileName</string>
./321habc2f-jk32-bbae-5tga-yha234b16lka.mobileprovision: <string>MyProvisioningProfileName</string>
By deleting every provisioning profile you don't want (or deleting all and downloading a new one from the developer profile.) this problem went away.
通过删除您不想要的所有配置文件(或删除所有配置文件并从开发人员配置文件下载新的配置文件),这个问题就消失了。
回答by COCONUT INFO
Egad… try this first: Our team encountered this exact issue trying to open an updated app with newly download Xcode 5.1 on iOS 7.1 device with a one day tardy profile. Hours later:
Egad……先试试这个:我们的团队在尝试使用新下载的 Xcode 5.1 在 iOS 7.1 设备上打开一个更新的应用程序时遇到了这个确切的问题,并且有一天的延迟配置文件。几个小时以后:
Download and install a new profile (as necessary) then:
下载并安装新的配置文件(根据需要),然后:
Make sure the BUNDLE IDENTIFIER in your project's Xcode's GENERAL view matches verbatim what the profile reads on your Developer WEB portal, and then be sure THAT profile is downloaded & installed in Xcode. Select that profile in your BUILD setting, and you could be solved by now (the App then installed on devices without issue), but we also noticed we could to go back to GENERAL view and the FIX button actually worked: it fixed the "not found" profile
确保项目 Xcode 的 GENERAL 视图中的 BUNDLE IDENTIFIER 逐字匹配您的 Developer WEB 门户上的配置文件读取的内容,然后确保该配置文件已下载并安装在 Xcode 中。在您的 BUILD 设置中选择该配置文件,您现在可以解决(该应用程序然后安装在设备上没有问题),但我们也注意到我们可以返回到 GENERAL 视图并且 FIX 按钮实际上起作用了:它修复了“不找到”个人资料
回答by rubberBall
I kept running into this issue with Xcode 7.1 and tried some of the solutions above but didn't have any success. What I found did solve the issue was going to Go > Go To Folder > ~/Library/MobileDevice/Provisioning Profiles and deleting all of the provisioning profiles.
我一直在使用 Xcode 7.1 遇到这个问题,并尝试了上面的一些解决方案,但没有任何成功。我发现确实解决了这个问题的方法是转到 > 转到文件夹 > ~/Library/MobileDevice/Provisioning Profiles 并删除所有的配置文件。
From there I added back the provisioning profiles on an as needed basis and it seemed fix the issue. I'll post back if I find that it doesn't permanently fix the issue, but so far so good.
从那里我根据需要重新添加了配置文件,它似乎解决了这个问题。如果我发现它不能永久解决问题,我会回帖,但到目前为止一切顺利。
回答by mcocaro
If anyone still has this issue - and happens to have setup a workspace with individual projects, I'd suggest you from the root folder do a:
如果有人仍然遇到此问题 - 并且碰巧设置了包含单个项目的工作区,我建议您从根文件夹执行以下操作:
egrep -R "INPUT_THE_ID_MISSING" *
and remove directly the PROVISIONING_PROFILE = "*****"
line from the file
in my case, it ended happening that an old xcodeproject has a bad provisioning but I was attempting to archive from within the workspace
并PROVISIONING_PROFILE = "*****"
在我的情况下直接从文件中删除该行,结果是旧的 xcodeproject 配置错误,但我试图从工作区中存档