我在使用 Xcode 8.1 和 Swift 3 编译时遇到此错误:
Swift stdlib 工具错误
编译日志的结尾如下所示:
/Users/..../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug/.../Contents/Frameworks/libswiftCore.dylib: replacing existing signature
/Users/..../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug/.../Contents/Frameworks/libswiftCore.dylib: CSSMERR_CSP_INVALID_CONTEXT_HANDLE
In architecture: x86_64
Probing signature of /Users/..../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug/.../Contents/Frameworks/libswiftXPC.dylib
/usr/bin/codesign '-r-' '--display' '/Users/..../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug/.../Contents/Frameworks/libswiftXPC.dylib'
error: Task failed with exit 1 signal 0 {
/usr/bin/codesign '--force' '--sign' '-' '--verbose' '/Users/..../Library/Developer/Xcode/DerivedData/.../Build/Products/Debug/.../Contents/Frameworks/libswiftCore.dylib'
}
非常奇怪的是,如果我将包含项目的文件夹复制到我的桌面,它确实编译没有错误。如果我将它复制到其他地方,它会出错。来回移动它几次以验证,最后在第三次移动之后,它在桌面上也出现错误。
有任何想法吗?
提前谢谢了。