简体   繁体   English

Xcode 5:“没有找到这样的配置文件......”错误

[英]Xcode 5: “No such provisioning profile was found …” error

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". 我在周末花了很多时间在这里和互联网上寻找解决方案,只是为了摆脱我在尝试存档应用程序以分发“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 我在project.pbxproj中删除了包含PROVISIONING_PROFILE的行,按照与此类似的帖子中找到的说明

project.pbxproj

I also removed both the stable and the beta versions of Xcode and reinstalled it from the App Store. 我还删除了Xcode的稳定版和测试版,并从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. 不知道它是否重要,但我删除了带有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? 你能帮我解决这个问题吗?

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... . 我尝试做一个Clean Clean Build Folder... I then tried to remove derived data. 然后我尝试删除派生数据。 None of this worked. 这些都没有奏效。

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. Xcode必须在打开时在某处存储缓存。 This seems crazy to me. 这对我来说似乎很疯狂。 But what can we do. 但我们能做些什么呢。

I hope this helps someone. 我希望这可以帮助别人。

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 only way I could stop this error from happening (even after adding valid Provisioning Profiles) was to manually edit the .pbxproj file within the *.xcodeproj package. 我可以阻止此错误发生的唯一方法(即使在添加有效的Provisioning Profiles之后)是手动编辑* .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年,为什么Apple的开发环境会如此恐龙?

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...) (对不起......我在早上浪费了这个......后心情不好......)

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. 好吧,我解决了这个问题,回到了Time Machine中存储的先前版本,删除了开发人员网站和计算机上的所有证书和配置文件,删除了~Library / MobileDevice / Provisioning Profiles中的文件以及存储在Keychain Access中的证书。 Also checked in project.pbxproj that no PROVISIONING_PROFILE was set. 还在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的设备,请阅读此内容

Quit Xcode and re-open, this worked for me. 退出Xcode并重新打开,这对我有用。 Would try first before spending too long attempting to fix it. 在尝试修复它之前花费太长时间先尝试。

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. Egad ......首先尝试一下:我们的团队遇到了这个问题,试图打开一个更新的应用程序,在iOS 7.1设备上新下载Xcode 5.1,并提供一天的简短配置文件。 Hours later: 几小时后:

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. 确保项目的Xcode的GENERAL视图中的BUNDLE IDENTIFIER与开发人员WEB门户上的配置文件读取的内容完全一致,然后确保在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 在BUILD设置中选择该配置文件,您现在可以解决(应用程序然后安装在没有问题的设备上),但我们也注意到我们可以返回到GENERAL视图并且FIX按钮实际工作:它修复了“not not发现“个人资料

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有一个错误的配置,但我试图从工作区内存档

Just set automatic option in Xcode. 只需在Xcode中设置自动选项即可。

在此输入图像描述

Below is what worked for me in XCode 7. 以下是XCode 7中对我有用的内容。

I had to change provision profile in XXXXTests too... 我不得不在XXXXTests中更改配置文件...

在此输入图像描述

在此输入图像描述

I kept running into this issue with Xcode 7.1 and tried some of the solutions above but didn't have any success. 我一直在使用Xcode 7.1遇到这个问题并尝试了上面的一些解决方案但没有取得任何成功。 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. 我找到了解决问题的方法是去Go> Go To Folder>〜/ 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. 如果我发现它不能永久解决这个问题,我会回发,但到目前为止还不错。

I was able to get a fix done just by doing the following: 通过执行以下操作,我能够完成修复:

  1. Xcode -> Preferences Xcode - >首选项
  2. Accounts 帐号
  3. Select your Apple ID and remove it by clicking the '-' button at the bottom 选择您的Apple ID并单击底部的“ - ”按钮将其删除
  4. Click the '+' button at bottom -> Add Apple ID 点击底部的“+”按钮 - >添加Apple ID
  5. Login with your Apple ID 使用您的Apple ID登录
  6. Download all certificates again 再次下载所有证书
  7. Specify your profiles in your Build Settings 在Build Settings中指定您的配置文件
  8. Build 建立

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. 它适合我。

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, eg 这应该产生具有相同名称的所有供应配置文件的列表,例如

./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. 通过删除您不想要的每个配置文件(或删除所有配置文件并从开发人员配置文件中下载新配置文件。)此问题就消失了。

I had this issue this morning. 今天早上我有这个问题。 The only way to resolve it was removing all my provisioning profiles from 解决它的唯一方法是从中删除所有配置文件

~Library/MobileDevice/Provisioning Profiles ~Library / MobileDevice / Provisioning Profiles

and downloading again all my provisioning profiles from 并再次下载我的所有配置文件

Xcode -> Preferences -> Accounts Xcode - >首选项 - >帐户

My project build and works now. 我的项目现在建立并运作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM