Xcode 8 中的代码签名错误

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

Code signing error in Xcode 8

iosswiftxcodesettingssigning

提问by Freddy Benson

I want to run my app on my device instead of on the simulator, but every time I try to run it, I get a code signing error:

我想在我的设备上而不是在模拟器上运行我的应用程序,但是每次我尝试运行它时,我都会收到代码签名错误:

  • 'AppName' requires a provisioning profile. Select a provisioning profile for the "Debug" build configuration in the project editor.
  • Code signing is required for product type 'Application' in SDK 'iOS 10.0'
  • “AppName”需要配置文件。在项目编辑器中为“调试”构建配置选择配置文件。
  • SDK“iOS 10.0”中的产品类型“应用程序”需要代码签名

I added a provisioning profile to the build settings under 'Code signing' but I still keep getting this error. Is there something wrong with my provisioning profile or am I looking in the wrong place? By the way, I used this provisioning profile on the previous version of Xcode and never ran into any problems.

我在“代码签名”下的构建设置中添加了一个配置文件,但我仍然不断收到此错误。我的配置文件有问题还是我找错了地方?顺便说一下,我在以前版本的 Xcode 上使用了这个配置文件,从来没有遇到任何问题。

回答by Doug Null

To fix it, I set > TARGETS > General tab > Signing > Automatically manage signing = CHECK MARK

为了修复它,我设置>目标>常规选项卡>签名>自动管理签名=检查标记

回答by Bifter

I had a similar problem and it was because my iPhone Developer certificate had expired. You can check this with the Keychain Access app in Utilities.

我遇到了类似的问题,这是因为我的 iPhone 开发人员证书已过期。您可以使用实用工具中的钥匙串访问应用程序进行检查。