尝试为iOS设备构建项目时出现CSSMERR_TP_NOT_TRUSTED错误(但模拟器工作正常)。我尝试过系统默认修复无效,现在正在尝试添加WWDR证书。
CSSMERR_TP_NOT_TRUSTED错误日志:
CodeSign /Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app
cd /Users/soroushhakami/dev/pplatsIos
setenv CODESIGN_ALLOCATE /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/codesign --force --sign 1934d5614330256a833582b123621542bdd8dcfe --resource-rules=/Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app/ResourceRules.plist --entitlements /Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Intermediates/pplats.build/Debug-iphoneos/pplats.build/pplats.xcent /Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app
/Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app: replacing existing signature/Users/soroushhakami/Library/Developer/Xcode/DerivedData/pplats-fzoberbyssrcczboxhhyvkpfflhj/Build/Products/Debug-iphoneos/pplats.app: CSSMERR_TP_NOT_TRUSTEDCommand /usr/bin/codesign failed with exit code 1
错误消息的最后一行,如果您不想全部阅读:CSSMERR_TP_NOT_TRUSTEDCommand /usr/bin/codesign failed with exit code 1
我的所有证书都有" this certificate was signed by an unknown authority "
错误。
但WWDR证书本身基于unknown authority
错误,让我对如何解决这个问题毫无头绪。
我确实删除了所有证书,在干净的钥匙串上安装WWDR,但错误仍然存在。有什么想法吗?
答案 0 :(得分:1)
您可能在Keychain Access中拥有过期的Apple全球开发者关系认证中心。如果是这样,您需要从系统中删除所有过期的副本,并在系统密钥链中安装续订的证书。
security find-identity -p codesigning
AppleWWDRCA.cer
证书
AppleDDRCA.cer
security find-identity -p codesigning