在XCode中签名应用程序:在钥匙串中找不到指定的项目

在XCode(产品>归档)中归档应用程序时,出现以下错误:

CodeSign /Users/xxx/Library/Developer/Xcode/DerivedData/name-xxx/Build/Intermediates/ArchiveIntermediates/name/InstallationBuildProductsLocation/Applications/name.app cd /Users/xxx/Documents/name/App/platforms/ios export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" Signing Identity: "iPhone Developer: xxx xxx (S5L8942T98)" Provisioning Profile: "iOS Team Provisioning Profile: xxx" (xxx) /usr/bin/codesign --force --sign xxx --entitlements /Users/xxx/Library/Developer/Xcode/DerivedData/name-xxx/Build/Intermediates/ArchiveIntermediates/name/IntermediateBuildFilesPath/name.build/Release-iphoneos/name.build/name.app.xcent --timestamp=none /Users/xxx/Library/Developer/Xcode/DerivedData/name-xxx/Build/Intermediates/ArchiveIntermediates/name/InstallationBuildProductsLocation/Applications/name.app error: The specified item could not be found in the keychain. 

我吊销了我的所有证书并创build了新的configuration文件,不幸的是这并没有帮助。

我发现这个线程 ,但我不认为这是相关的。 很明显,我的钥匙链里缺less一些东西,但是什么?

编辑:

这是我的钥匙串的截图:

在这里输入图像说明

Id匹配错误代码中的一个。

简单的解决scheme是转到派生数据(XCode>首选项>位置>单击派生数据目录旁边的箭头),然后删除以应用程序命名的文件夹。

作为一个额外的措施,您可以重新启动XCode并在第一步之后清理项目,但可能没有必要。