Swift stdlib 工具错误 [英] Swift stdlib tool Error
问题描述
我在使用 Xcode 8.1 和 Swift 3 进行编译时遇到此错误:
I'm getting this error on compilation with Xcode 8.1 and Swift 3:
Swift stdlib 工具错误
Swift stdlib tool Error
编译日志的结尾看起来像:
The end of the compile log looks like:
/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'
}
非常奇怪的是,如果我将带有项目的文件夹复制到我的桌面,它确实可以编译而不会出错.如果我将其复制到其他地方,则会出错.来回移动几次验证,最后在第三次移动后,它在桌面上也出错了.
The very strange thing is that if I copy the folder with the project to my Desktop, it does compile without the error. If I copy it elsewhere, it errors. Moving it back and forth a couple of times to verify, finally after the third move, it's erroring on the Desktop as well.
有什么想法吗?
非常感谢.
推荐答案
这些症状的不确定性让我认为这是 Xcode 的 DerivedData
文件夹中的陈旧数据的问题.
The non-deterministic nature of the symptoms makes me think it's a problem with stale data in Xcode's DerivedData
folder.
删除 /Users/..../Library/Developer/Xcode/DerivedData/
的内容,这应该可以解决您的问题.
Trash the contents of /Users/..../Library/Developer/Xcode/DerivedData/
, this should solve your issue.
删除这个文件夹的内容没有问题,因为如果它丢失,Xcode 会重新创建它需要的内容.
Deleting the content of this folder is not problematic because Xcode will recreate what it needs if it's missing.
这篇关于Swift stdlib 工具错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!