我最近将mac OS的更新从10.11更新到10.12,我再也无法在Xcode 8.0中签署我的iOS应用程序了 .
我收到此错误:
CodeSign /Users/aymericpitre/Library/Developer/Xcode/DerivedData/OrpiDirect-ghphwnhfbtdulhgauptikzmsrqdi/Build/Products/Debug-iphoneos/OrpiDirect.app
cd /Users/aymericpitre/Documents/projets/Ville-de-lyon-iPhone/VilleDelyon_git/ville_de_lyon
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: aymeric xxxx (SYC4JR6K8G)"
Provisioning Profile: "VDL-sierra"
(756b4f3a-26aa-4937-ba40-4cc4eea03e92)
/usr/bin/codesign --force --sign D60599B3AE74EE1D4863C249026FA28545A07689 --entitlements /Users/aymeric/Library/Developer/Xcode/DerivedData/OrpiDirect-ghphwnhfbtdulhgauptikzmsrqdi/Build/Intermediates/OrpiDirect.build/Debug-iphoneos/OrpiDirect.build/OrpiDirect.app.xcent --timestamp=none /Users/aymeric/Library/Developer/Xcode/DerivedData/OrpiDirect-ghphwnhfbtdulhgauptikzmsrqdi/Build/Products/Debug-iphoneos/OrpiDirect.app
Command /usr/bin/codesign failed with exit code 5
供应配置文件似乎没问题,因为我在 Xcode/preferences/accounts
窗口中找到它 .
我试图在派生文件夹中运行 xattr -c *
命令,但它不起作用 .
5 回答
我终于成功了 . 在深入了解内部日志后,我意识到问题来自钥匙串 . 我试图用GUI删除所有条目,但是一个无法删除(名为“1”)
所以我不得不删除所有的keychain文件夹:
rm -rf /Users/my_user/Library/Keychains
重新启动mac,再次安装密钥,一切都按预期工作 .
免责声明:首先备份所有需要的密钥! (删除前导出)对于Chrome登录等任何服务,您需要再次输入凭据
我对此有一个非常可怕的答案 . 我不知道我的系统中有什么损坏,但经过如此多的重新安装和删除xcode仍然无法解决问题 . 所以我格式化我的硬盘并重新安装mac OS Sierra和xcode 8,这解决了这个问题
在窗口选项卡=>管理器下尝试设备中的配置 . 然后重新添加它们(在苹果网站上再次下载) . 并尝试再次编译 .
Xcode 8允许您自动签名 . 您需要在设置中选择目标 - >常规 . 你会看到图像上的复选框:
选中此复选框后,您需要选择您的团队(如图像上的红色矩形) . 之后,Xcode将为您的应用程序创建团队配置文件,您的应用程序将自动签名 .
附:我没有在图像上看到团队Dropbox中的团队,你需要Xcode - > Preferencies:
之后,您需要输入“帐户”标签 - >点按按钮:
之后,您与开发者帐户的团队将显示在团队保管框中,就像在第一张图片上一样 .
我在钥匙串访问中删除了一个名为“1”的密钥 .
然后xcode开始工作了!