Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift stdlib tool Error

Tags:

I'm getting this error on compilation with Xcode 8.1 and Swift 3:

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.

Any ideas?

Many thanks in advance.

like image 666
Dribbler Avatar asked Nov 12 '16 21:11

Dribbler


1 Answers

I had the same issue earlier today.

I am new to Xcode and swift and have just started experimenting. In one of the first tutorials it suggests compiling for a simulator and then trying to compile for your device.

When I compiled for my device it asked for my keychain password, the first time I tried I got my password wrong, assuming it was not necessary I clicked the deny access to the keychain button.

I read a few stack overflow queries on the same topic and found one which suggested rebooting the Mac.

This worked for me.

  1. restart your Mac
  2. open your Xcode project
  3. select your device as a target
  4. compile
  5. enter keychain password and click Allow or Always Allow
like image 113
Prashant Fernandes Avatar answered Oct 03 '22 16:10

Prashant Fernandes