ios xcode 中的代码签名错误,找不到身份

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

code sign error in xcode, no identity found

iosiphonexcode

提问by Ralf

I've looked to solve this problem for several hours now, so hopefully someone can help me.

我已经寻找解决这个问题几个小时了,所以希望有人可以帮助我。

When I try to Archive my project (so I can put it in the app market), I get a code sign error:

当我尝试存档我的项目(以便我可以将其放入应用程序市场)时,出现代码签名错误:

Codesign failed with exit code 1

代码设计失败,退出代码为 1

and some additional information says

和一些额外的信息说

iPhone Distribution: company name: no identity found

iPhone 分布:公司名称:未找到身份

I've created a distribution profile (multiple times) and followed several suggestions (like uninstalling/installing Xcode). Also my distribution profile expiration date is February 2014.

我已经创建了一个分发配置文件(多次)并遵循了一些建议(比如卸载/安装 Xcode)。此外,我的分发配置文件到期日期是 2014 年 2 月。

I can Build my project without any problems and run it on an iPhone with my iPhone Developer profile.

我可以毫无问题地构建我的项目,并使用我的 iPhone 开发人员配置文件在 iPhone 上运行它。

Does anyone knows what I'm doing wrong here? Any help would be appreciated.

有谁知道我在这里做错了什么?任何帮助,将不胜感激。

回答by nsgulliver

Your Distribution Profile might not be valid or not properly verified, go to Organizer->Devices->Provisioning Profilesand try to refresh your profiles(delete & refresh) they will show up after refreshing. Once refreshed, make sure the green icon as status is showing with the profiles if it is valid and signed properly. if it does not solve your problem then you need to create the Distribution profile again. You could find this tutorialhelpful if you are getting started with distribution of your app. I hope it helps your cause

您的分发配置文件可能无效或未正确验证,请访问Organizer->Devices->Provisioning Profiles并尝试刷新您的配置文件(删除和刷新),它们将在刷新后显示。刷新后,如果配置文件有效且签名正确,请确保作为状态的绿色图标与配置文件一起显示。如果它不能解决您的问题,那么您需要再次创建分发配置文件。如果您开始分发应用程序,您会发现本教程很有帮助。我希望它有助于你的事业

回答by aircraft

I have the same issue, the reason is after I run other project and fix the issuewith the other project.

我有同样的问题,原因是在我运行其他项目和fix the issue其他项目之后。

My solution is :

我的解决方案是:

Xcode-> Proferences-> Choose Apple IDs-> Choose Team-> View Details-> Signing Identities iOS Developmentand iOS Distributionreset.

Xcode-> Proferences-> 选择Apple IDs-> 选择Team-> View Details-> 签署身份iOS DevelopmentiOS Distribution重置。

Then Run project to iphoneit works fine.

然后运行项目到iphone它工作正常。

回答by zeeawan

I've got the similar error and found the reason that my certificate in keychain was not the one that I attached to the provisioning filein apple developer portal. Because there were two certificates with same name and I downloaded the wrong one. Upon downloading the correct certificate and double clicking to put into keychain solved the problem.

我遇到了类似的错误,并发现钥匙串中的证书不是我附加到苹果开发人员门户中的配置文件的原因。因为有两个同名的证书,我下载了错误的一个。下载正确的证书并双击放入钥匙串后解决了问题。

回答by tmr

i am not sure why my solution worked, but after hours of trying everything else... i changed code signing settings in both project and target windows. code settings under 'project' shows my provisioning profile (photo below), code settings under 'target' is now set to 'automatic'. maybe before i had conflicting settings?

我不确定为什么我的解决方案有效,但经过数小时的尝试……我更改了项目和目标窗口中的代码签名设置。“项目”下的代码设置显示了我的配置文件(下图),“目标”下的代码设置现在设置为“自动”。也许在我有冲突的设置之前?

enter image description here

在此处输入图片说明

回答by Ralf

I have been in contact with apple and after a few emails back and forth they found my problem. For some reason (I don't know how this got there) in the Build Settings under Code Signing -> Other Code Signing Flags I had "--keychain keychainname.keychain" written down there. After I removed this my code sign error dissapeared.

我一直在与苹果联系,在来回发了几封电子邮件后,他们发现了我的问题。出于某种原因(我不知道这是如何到达那里的)在代码签名-> 其他代码签名标志下的构建设置中,我在那里写下了“--keychain keychainname.keychain”。删除它后,我的代码符号错误消失了。

Every body thanks for the help.

每一个身体都感谢你的帮助。

回答by josephmisiti

The problem is you need to create/update a provisioning profile for you new device. Provisioning profiles are associated with devices, once you set that up correctly, you should be good to go

问题是您需要为新设备创建/更新配置文件。配置文件与设备相关联,一旦设置正确,就可以开始了

回答by Dhilip

I didnt have proper developer/distribution certificate in my keychain. When i installed it to my keychain, issue disappeared!

我的钥匙串中没有适当的开发人员/分发证书。当我将它安装到我的钥匙串时,问题消失了!