ios – SecKey API返回:-25304 libswiftAVFoundation.dylib:未知错误-1 = ffffffffffffffff错误:任务失败,退出1信号0

自10.12 Sierra主要更新以来,我无法仅在设备上编译我的一个iOS项目.但非常奇怪,它在模拟器上工作.
我试图在Xcode中删除并重置我的开发帐户,硬重启,删除并重置钥匙串中的所有证书等.
XCode 8.0.我也尝试过8.1 beta,同样的.

错误 :

SecKey API returned: -25304, (null)/Users/****/Library/Developer/Xcode/DerivedData/****-epkppprfmidyatftsvnxgjqsawit/Build/Products/Debug-iphoneos/****.app/Frameworks/libswiftAVFoundation.dylib: unknown error -1=ffffffffffffffff
error: Task failed with exit 1 signal 0 {
/usr/bin/codesign ‘–force’ ‘–sign’ ‘C47B52FDE2CABFC81D33BED8937984AF8BC6DC33’ ‘–verbose’ ‘/Users/****/Library/Developer/Xcode/DerivedData/****-epkppprfmidyatftsvnxgjqsawit/Build/Products/Debug-iphoneos/***.app/Frameworks/libswiftAVFoundation.dylib’

最佳答案
我遇到过同样的问题,

通过将此行添加到项目配置中来解锁您的钥匙串(Build> Execute shell)

#unlock the keychain
security unlock-keychain -p “myPrettyPassword” $HOME/Library/Keychains/MyPrettyKeychain.keychain

转载注明原文:ios – SecKey API返回:-25304 libswiftAVFoundation.dylib:未知错误-1 = ffffffffffffffff错误:任务失败,退出1信号0 - 代码日志