Xcode 命令/usr/bin/codesign 失败,退出代码为 1:errSecInternalComponent

Xcode 命令/usr/bin/codesign 失败,退出代码为 1:errSecInternalComponent

问题描述:

我正在尝试向我的 Xcode 添加新的配置文件,以测试设备上的应用程序.以下是我遵循的步骤:

I am trying to add new provisioning profile to my Xcode, to test an app on the device. Here are the steps I followed:

  1. 已删除所有证书和配置文件

  1. Deleted all certificates and provisioning profiles

创建/添加 IOS 开发证书

Create/Add IOS Dev Certificate

在线添加我的 IOS 设备

Add My IOS Device Online

创建 IOS 配置文件

Create IOS Provisioning Profile

添加 IOS 配置文件

Add IOS Provisioning Profile

清理应用

构建然后运行应用

在构建设置中设置编码和配置文件

Set Codesigning nd Provisioning Profile In Build Settings

多次谷歌搜索 > 没有成功

Lots of Googling > to no successes

这是我得到的错误:

CSSM_SignData returned: 800108E6
/Users/alexpelletier/Library/Developer/Xcode/DerivedData/MyExpense-efnqzvoqwngzcmazaotyalepiice/Build/Products/Debug-iphoneos/MyExpense.app:     errSecInternalComponent
Command /usr/bin/codesign failed with exit code 1

打开钥匙串访问,然后在文件菜单中选择锁定所有钥匙串>.

Open Keychain Access, then in the File menu select Lock All Keychains.

然后返回 Xcode 并清理和重建.它会再次提示您输入密码以解锁钥匙串.

Then go back to Xcode and clean and rebuild. It will prompt you for your password again to unlock the keychain.

在此之后,假设您没有其他编译问题,它将成功!

After this, assuming you have no other compile issues, it will succeed!