在钥匙串中找不到有效的 iOS 代码签名密钥
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32647815/
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
No valid iOS code signing keys found in keychain
提问by amun1000
I can Archive and Publish an app in debug mode, but when switched to App Mode i get the following error:
我可以在调试模式下存档和发布应用程序,但是当切换到应用程序模式时,我收到以下错误:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets: Error: No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from https://developer.apple.com.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets:错误:在钥匙串中找不到有效的 iOS 代码签名密钥。您需要从https://developer.apple.com请求一个代码签名证书。
the attached file shows i do have the relevant Certificates but Xamarin keeps complaining
附件显示我确实有相关证书,但 Xamarin 一直在抱怨
The app has been successfully published before but using a different profile on the same mac. Both users key chains contain the same certificates
该应用程序之前已成功发布,但在同一台 Mac 上使用不同的配置文件。两个用户密钥链都包含相同的证书
回答by Fabio Silva Lima
回答by amun1000
got it work in the end by remving all the certificates and then putting them back in the Key chain
通过删除所有证书然后将它们放回钥匙链中,最终使其工作
回答by M. Travis Volker
I get this error when I open Xamarin University Exercises with Visual Studio 2015. A bug was entered and they decided that it is expected behavior. Xamarin Bug
当我使用 Visual Studio 2015 打开 Xamarin 大学练习时出现此错误。输入了一个错误,他们认为这是预期行为。Xamarin 错误
If you work in Xamarin Studio and set this property for whatever reason, then open it in VS, you may hit this issue with no way to edit / remove the Entitlement setting in the Project Properties.
如果您在 Xamarin Studio 中工作并出于任何原因设置此属性,然后在 VS 中打开它,您可能会遇到此问题而无法编辑/删除项目属性中的权利设置。
I guess the Exercises are created with Xamarin Studio.
我猜这些练习是用 Xamarin Studio 创建的。
The accepted workaround is to open the iOS .csproj and manually edit the <CodesignEntitlements></CodesignEntitlements>
for the Debug|iPhone
PropertyGroup.
接受的解决办法是打开了iOS的.csproj和手动编辑<CodesignEntitlements></CodesignEntitlements>
的Debug|iPhone
的PropertyGroup。
回答by danimihalca
I struggled too for the last day to make Xamarin (now Visual Studio for Mac) successfully deploy on my device with the free developer signing (since I'm new in this area and I'm not ready yet to join the developer program yet), and what helped was to first deploy a dummy app with the same bundle identifier from XCode like others suggested on different sources, keep CodesignEntitlementsas it is in the .csproj file, but replace CodesignKey's value iPhone Developerlike in the answer here: https://stackoverflow.com/questions/58062268/no-valid-ios-code-signing-keys-found-in-keychain-you-need-to-request-a-codesign#=
在最后一天,我也努力使 Xamarin(现在是 Visual Studio for Mac)通过免费的开发人员签名成功部署在我的设备上(因为我是这个领域的新手,我还没有准备好加入开发人员计划) ,并且有帮助的是首先像其他人在不同来源上建议的那样,首先从 XCode 部署具有相同捆绑标识符的虚拟应用程序,将CodesignEntitlements保留为 .csproj 文件中的原样,但替换CodesignKey的值iPhone Developer就像在此处的答案中一样:https://stackoverflow.com/questions/58062268/no-valid-ios-code-signing-keys-found-in-keychain-you-need-to-request-a-codesign# =
Hope this will help somebody in the future like it helped me!
希望这会帮助将来的人,就像它对我的帮助一样!
回答by fatih
Sometimes that happens when you newly start your computer and Visual Studio. Just don't hit green triangle debug Combobox-button and check what is selected in this combobox. If it is "Device"
as in picture 1select a simulator from the list as in picture 2and start debugging. Else you get this error since VS will try to start debugging in a real device if "Device" selected in the combobox.
有时,当您新启动计算机和 Visual Studio 时会发生这种情况。只是不要点击绿色三角形调试组合框按钮并检查在此组合框中选择的内容。如果"Device"
如图1 所示,从列表中选择一个模拟器,如图2 所示,然后开始调试。否则您会收到此错误,因为如果在组合框中选择了“设备”,VS 将尝试在真实设备中开始调试。
回答by raV720
I needed to create Signing Identity certificate from scratch and recreate Provisioning Profiles (on apple developer site). Then download using xcode.
我需要从头开始创建签名身书并重新创建配置文件(在苹果开发者网站上)。然后使用xcode下载。
回答by Faheem
you can try either of this
你可以试试这个
- remove any keys, if existing form Entitlements.plist .
- Change the proj run mode to debug , select device .
- 删除任何键,如果存在形式 Entitlements.plist 。
- 将项目运行模式更改为调试,选择设备。