xcode 收到“在您的钥匙串中找不到与此配置文件匹配的有效签名身份”警告

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

Getting "A valid signing identity matching this profile could not be found in your keychain" warning

iphonexcodekeychain

提问by arachide

I hope to test my app on iPod Touch

我希望在 iPod Touch 上测试我的应用程序

I created development provisioning profile.

我创建了开发配置文件。

I dragged downloaded .mobileprovision file to Organizer

我将下载的 .mobileprovision 文件拖到 Organizer

There is a yellow triangle warned that "A valid signing identity matching this profile could not be found in your keychain"

有一个黄色三角形警告“在您的钥匙串中找不到与此配置文件匹配的有效签名身份”

The others distribution provisioning profiles have no any problem.

其他分发配置文件没有任何问题。

I checked my connected iPod Touch. Organizer also said that:

我检查了我连接的 iPod Touch。主办方还表示:

OS Installed on "interdev"'s iPod 3.1.3 (7E18)

安装在“interdev”的 iPod 3.1.3 (7E18) 上的操作系统

Xcode Supported iPhone OS Versions

Xcode 支持的 iPhone 操作系统版本

  • 3.1.1 (7C146)
  • 3.1.1 (7C145)
  • 3.1 (7C144)
  • 3.0.1 (7A400)
  • 3.0
  • 2.2.1
  • 2.2
  • 2.1.1
  • 2.1
  • 2.0.2 (5C1)
  • 2.0.1 (5B108)
  • 2.0 (5A347)
  • 2.0 (5A345)
  • 3.1.1 (7C146)
  • 3.1.1 (7C145)
  • 3.1 (7C144)
  • 3.0.1 (7A400)
  • 3.0
  • 2.2.1
  • 2.2
  • 2.1.1
  • 2.1
  • 2.0.2 (5C1)
  • 2.0.1 (5B108)
  • 2.0 (5A347)
  • 2.0 (5A345)

iOS 3.1.3

iOS 3.1.3

Xcode 3.1

Xcode 3.1

Do I need to upgrade Xcode?

我需要升级Xcode吗?

采纳答案by christo16

It sounds like you don't have a development certificate in your keychain that matches one of your provisioning profiles.

听起来您的钥匙串中没有与您的配置文件之一匹配的开发证书。

dev portal screenshot

开发门户截图

Make sure that you have the dev cert and you have matching provisioning profiles. Also, if your app is using the keychain, make sure to include an Entitlements.plist (containing your app id, so your apps can share a "slice" of the keychain) in your project.

确保您拥有开发证书并且拥有匹配的配置文件。此外,如果您的应用程序使用钥匙串,请确保在您的项目中包含 Entitlements.plist(包含您的应用程序 ID,以便您的应用程序可以共享钥匙串的“切片”)。

回答by Simon Alexander

OK, I had this exact problem and have searched the internet far and wide for a clear description of what you should do to resolve this.

好的,我遇到了这个确切的问题,并且已经在互联网上广泛搜索,以明确说明您应该采取什么措施来解决这个问题。

I know this is an old topic, but I'm going to write this for the people who may stumble across this in their seemingly hopeless search for an answer.

我知道这是一个古老的话题,但我将写这篇文章给那些在寻找答案时可能会偶然发现的人。

  1. I'm sure there is another way to do this, but in all honesty, unless you're working with a TON of apps and are feeling too lazy to reassign a new certificate, just do this!

  2. I am really new to the dev center on apple.com and to xcode, so i'm going to write this out as thoroughly as I can.

  1. 我敢肯定还有另一种方法可以做到这一点,但老实说,除非您正在使用大量应用程序并且懒得重新分配新证书,否则只需这样做!

  2. 我对 apple.com 上的开发中心和 xcode 真的很陌生,所以我将尽可能彻底地写出来。

Obvious:

明显的:

READ ALL OF THESE INSTRUCTIONS BEFORE STARTING! THERE ARE A FEW TRICKY THINGS THAT SHOULD BE NOTED BEFORE STARTING! I TRIED TO MAKE THEM OBVIOUS IF YOU DIDN'T READ THEM ALL BEFORE YOU STARTED, BUT FOR SAFETY SAKE, read them all first.

在开始之前阅读所有这些说明!在开始之前应该注意一些棘手的事情!如果您在开始之前没有阅读它们,我试图让它们变得显而易见,但为了安全起见,请先阅读它们。

You need a paid developer account to put ANYTHING on your iphone/ipod/ipad through Xcode.

您需要一个付费的开发者帐户才能通过 Xcode 在您的 iphone/ipod/ipad 上放置任何东西。

Ok. first, go to your applications folder and open keychain access.

好的。首先,转到您的应用程序文件夹并打开钥匙串访问。

Note that you can click on "login" and "System" words at the top left. This is vital to a later step, and to the next couple as well. You will need to unlock them if they are locked so that you can modify the content in each.

请注意,您可以单击左上角的“登录”和“系统”字样。这对后面的步骤至关重要,对下一个步骤也很重要。如果它们被锁定,您将需要解锁它们,以便您可以修改每个中的内容。

find your certificates(all of them, the worldwide dev one, the developer one, and possibly another one with the same name associated with it as the developer) in login and system

在登录名和系统中找到您的证书(所有证书,全球开发者证书,开发者证书,可能还有另一个与开发者同名的证书)

delete the bastards.

删除混蛋。

If you try deleting them, and they still stay in the list, you will just need to reboot your computer and do it again. This was the most annoying part of my journey to understanding the solution, so enjoy this information. A reboot will fix that issue if it arises.

如果您尝试删除它们,但它们仍保留在列表中,您只需要重新启动计算机并再次执行此操作。这是我理解解决方案过程中最烦人的部分,所以请享受这些信息。如果出现该问题,重新启动将解决该问题。

Once all traces of those certificates are gone from the lists:

一旦这些证书的所有痕迹从列表中消失:

Get rid of the keys associated with those certificates. They will probably have your name attached to them and you can find them by clicking on "keys" at the bottom of keychain access window and looking in either the login or system list. Delete them and delete them good. Remember, if they don't leave the list after you press and confirm your deletion, reboot and it'll work.

摆脱与这些证书关联的密钥。他们可能会附上您的名字,您可以通过单击钥匙串访问窗口底部的“钥匙”并查看登录或系统列表来找到它们。删除它们并删除它们很好。请记住,如果在您按下并确认删除后他们没有离开列表,请重新启动,它会起作用。

IF YOU WORKED ON A DIFFERENT MACHINE WITH NO ISSUES AND THEN SWITCHED TO A NEW MACHINE AND EVERYTHING WENT HAYWIRE, THEN THERE WILL BE NO KEYS TO DELETE. THIS IS WHERE THE PROBLEM HAS BEEN FOR YOU. DO NOT WORRY! WE WILL CREATE NEW KEYS TOGETHER AND WE SHALL BE HAPPY!

如果您在另一台机器上工作没有任何问题,然后切换到新机器并且一切都变得杂乱无章,那么将没有要删除的键。这就是您的问题所在。不要担心!我们将一起创造新的钥匙,我们会很高兴的!

Using SAFARI

使用 SAFARI

Using SAFARI

使用 SAFARI

Using SAFARI

使用 SAFARI

(using safari is important because you will come across a needless error while trying to upload your certificate request otherwise. This was one tidbit of information that saved me from tearing all of my hair out as I tried time and time again to submit through Chrome.)

(使用 safari 很重要,因为否则在尝试上传证书请求时会遇到不必要的错误。这是一条信息,当我一次又一次尝试通过 Chrome 提交时,这是一条信息,它使我免于扯掉所有头发。 )

go to developer.apple.com and sign in and go to the ios portion of the dev center.

转到 developer.apple.com 并登录并转到开发中心的 ios 部分。

go to the ios provisioning portal on the right hand side of that screen.

转到该屏幕右侧的 ios 配置门户。

click certificates, and REVOKE the current (and problematic) certificate.

单击证书,并撤销当前(和有问题的)证书。

click Home on the left hand side.

单击左侧的主页。

click on the "Launch Assistant" button under the "Get your application on an iOS with the Development Provisioning Assistant" headline towards the bottom of the screen.

单击屏幕底部“使用开发供应助手在 iOS 上获取应用程序”标题下的“启动助手”按钮。

Go through and follow all of the directions.

通过并遵循所有的指示。

It will tell you to open up your applications folder and open keychain assistant.

它会告诉您打开应用程序文件夹并打开钥匙串助手。

at the top of your screen (next to the apple symbol, while the keychain access window is active (hey, i said i was going to make it easy for beginners) click on the words "Keychain Access"

在屏幕顶部(苹果符号旁边,当钥匙串访问窗口处于活动状态时(嘿,我说我会让初学者更容易)点击“钥匙串访问”字样

click certificate assistant

点击证书助手

click Request a certificate from a certificate authority.

单击从证书颁发机构请求证书。

fill in your information and then click saved to disk. and continue.

填写您的信息,然后单击保存到磁盘。并继续。

follow the steps to create the request file and save it to your desktop (which is default, so you will probably just need to say ok)

按照步骤创建请求文件并将其保存到您的桌面(这是默认设置,因此您可能只需要说好)

go back to your SAFARI window, and it will be asking you to choose the certificate request file.

回到您的 SAFARI 窗口,它会要求您选择证书请求文件。

choose it from the desktop and continue through the assistant until it's complete.

从桌面选择它并继续通过助手直到它完成。

you have created the necessary public and private keys while creating the certificate request. SO YOU HAVE KEYS! YAAAAY!

在创建证书请求时,您已经创建了必要的公钥和私钥。所以你有钥匙!耶!

next step is to download the WWDR intermediate certificate and your newly created development certificate.

下一步是下载 WWDR 中间证书和您新创建的开发证书。

Both of these can be found in the "certificate" tab on the left side of your screen. The WWDR is shown as a link under the development certificate list.

这两个都可以在屏幕左侧的“证书”选项卡中找到。WWDR 显示为开发证书列表下的链接。

Download them and DO NOT CLICK THEM TO AUTOMATICALLY INSTALL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

下载它们,不要点击它们自动安装!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This is where you will get into stupid trouble and think, I DID EVERYTHING RIGHT! I DID WHAT YOU ASKED OF ME AND STILL THIS DOES NOT WORK!

在这里你会陷入愚蠢的麻烦并认为,我做的一切都是对的!我做了你对我的要求,但还是不行!

Here's the trick. The final piece of the puzzle.

这是诀窍。最后一块拼图。

Open your downloads folder and find the downloaded files.

打开您的下载文件夹并找到下载的文件。

Open Keychan Access (if you closed it) and find the keys that were created while making your certificate request. They will be either in the login or the System list. Don't forget to unlock the lists if necessary.

打开 Keychan Access(如果您关闭它)并找到在发出证书请求时创建的密钥。它们将位于登录名或系统列表中。如有必要,不要忘记解锁列表。

Drag and drop the downloaded certificates INTO THE LIST WHERE THE KEYS ARE!

将下载的证书拖放到钥匙所在的列表中!

If you drag and drop them into the other list, the keys will have no idea that you did that, and they will be lonely forever and you will feel your chest tighten up and the rage of the unknown boiling from your gut.

如果您将它们拖放到另一个列表中,钥匙将不知道您这样做了,它们将永远孤独,您会感到胸口发紧,未知的愤怒从您的内心沸腾。

If you dropped them into the list that contains the keys, then you will notice a little drop down arrow to the left of the iphone developer certificate you just dropped in there. Click it and revel in the beauty of a key hanging out with its long lost friend.

如果您将它们放入包含密钥的列表中,那么您会注意到刚刚放入的 iphone 开发人员证书左侧有一个小下拉箭头。单击它并陶醉于与失散已久的朋友闲逛的钥匙的美丽。

THAT'S IT!

就是这样!

Now when you make a new mobile provision through the ios portal, and link it inside there with your newly created certificate, everything will be copacetic inside Xcode.

现在,当您通过 ios 门户进行新的移动配置,并将其与新创建的证书链接到那里时,Xcode 中的所有内容都将同步。

回答by James K

I had the same problem and solved it very simply in XCode Organizer - I'm using Version 4. All I did was go to the top Library section and select Provisioning Profiles, and import the downloaded profiles that I had received in my Safari downloads named "name.mobileprovision".

我遇到了同样的问题,并在 XCode Organizer 中非常简单地解决了它 - 我使用的是版本 4。我所做的只是转到顶部的库部分并选择配置配置文件,然后导入我在 Safari 下载中收到的下载配置文件,名为“name.mobileprovision”。

回答by Glenn

I got that same bloody msg. Seems to happen every time my provisioning profiles expire. It happened again just now; I clicked Renew, downloaded the new profiles, installed them in Xcode, and there's that msg again.

我收到了同样的血腥味精。每次我的配置文件到期时似乎都会发生。刚才又发生了;我点击了 Renew,下载了新的配置文件,将它们安装在 Xcode 中,然后又出现了那个 msg。

So then in the Portal I clicked "Edit" by the profile, then Modify, and on the resulting screen the checkbox by MY name -- for which cert to use -- was unchecked! So I checked the box, hit Submit, and when the new profile became available installed the thing in Xcode. I'll be darned; the blasted thing worked.

因此,然后在门户中,我按配置文件单击“编辑”,然后单击“修改”,在结果屏幕上,我的姓名复选框 - 要使用哪个证书 - 未选中!所以我选中了这个框,点击提交,当新的配置文件可用时,在 Xcode 中安装了这个东西。我会被诅咒的;该死的东西奏效了。

How in the world that thing became UNchecked I'll never know, but now at least I know what to do.

我永远不会知道这件事到底是如何不受检查的,但现在至少我知道该怎么做。

回答by Bobjt

For the iOS Provisioning Profile error -

对于 iOS 配置文件错误 -

Valid signing identity not found

未找到有效的签名身份

see Apple's published steps to resolve this problem, titled What does 'Valid Signing Identity Not Found' mean and how do I resolve it?.

请参阅 Apple 发布的解决此问题的步骤,标题为“未找到有效签名身份”是什么意思,我该如何解决?.

回答by user841785

I had a working iPad provisioning profile installed with XCode 4, then added an iPhone and found that the newly downloaded provisioning profile wouldn't work with either device. Checking the certificate and the link in the keychain did not help for me.

我在 XCode 4 上安装了一个有效的 iPad 配置文件,然后添加了一个 iPhone,发现新下载的配置文件不适用于任一设备。检查证书和钥匙串中的链接对我没有帮助。

Turns out that after re-adding my certificates, and trying to close and reopen xcode, I needed a reboot before I could add the provisioning profile back into xcode and make it happy. Perhaps there is some underlying problem about needing to refresh values cached by keychain in RAM?

事实证明,在重新添加我的证书并尝试关闭并重新打开 xcode 后,我需要重新启动才能将配置文件添加回 xcode 并使其满意。也许需要刷新 RAM 中钥匙串缓存的值存在一些潜在问题?

It is possible it may have worked by just logging out and logging back in too.

它可能只通过注销并重新登录来工作。

回答by Flatlyn

Another cause of this I discovered can be if you haven't created a Distrubution Certificate properly. I dismissed the message Xcode gave saying it would generate one for me, but after restarting and letting it generate one it worked no problem

我发现的另一个原因可能是您没有正确创建分发证书。我驳回了 Xcode 给出的消息,说它会为我生成一个,但是在重新启动并让它生成一个后,它没有问题

回答by capikaw

If you know (for sure) that your key/pair and provisioning profiles are installed properly but you're STILL getting the infamous error, this simple solution worked for me (for good measure, clean your target first).

如果您知道(肯定)您的密钥/对和配置文件已正确安装,但您仍然遇到臭名昭著的错误,这个简单的解决方案对我有用(为了更好的衡量,首先清理您的目标)。

Go into build settings and locate the code signing area. If it's not already selected, choose the profile type in the "Automatic Profile Selector" section at the top. Try toggling between direct selecting and the automatic profile selector if it was already there.

进入构建设置并找到代码签名区域。如果尚未选择,请在顶部的“自动配置文件选择器”部分中选择配置文件类型。如果它已经存在,请尝试在直接选择和自动配置文件选择器之间切换。

Worked for me!

对我来说有效!

回答by Grant Cermak

Another cause of this is when you choose the wrong Application on the "Choose an application record and a profile to sign with" screen. This can happen easily if you have multiple applications with somewhat similar names and you happen to select one that does not match the provisioning profile used in the archive build.

另一个原因是当您在“选择一个应用程序记录和一个用于签名的配置文件”屏幕上选择了错误的应用程序时。如果您有多个名称有些相似的应用程序,并且您碰巧选择了一个与存档构建中使用的配置文件不匹配的应用程序,那么这很容易发生。