Swift stdlib tool Error: Task failed with exit 0 signal 4

After updating to xCode 9.4 and High Sierra, running the App on an actual device I get this error:

Swift stdlib tool Error: Task failed with exit 0 signal 4
Running it on simulator there is no error.

Replies

With XCode 10 beta this error shows "Command CodeSign failed with a nonzero exit code"

What is device's IOS version ?

iOS 11.4.1
Deployment Target: 11.0

Have you included some framework manually ?

if so look here h ttps://github.com/mattgallagher/CwlSignal/issues/16

No. This is a simple "Hello World" App. No Frameworks.
Automatically manage signing.

This may be a silly question, but have you tried cleaning the build folder? There have been occasional Xcode version updates that somehow fail to recompile or rebuild everything they need, and in that case it may be necessary to clean the build folder.


If you can try it, can you reply here whether it works or not? That might help others having the same problem.

I am having the same issue. It happens all of the sudden. Clean and build does not seem to fix it. Any suggestions?

No suggestions about fixing it, but the next step is to take a look at the detailed build transcript. The error messages shown in this thread are the summary status shown when the build finishes. The actual error will be shown somewhere earlier in the transcript — or should be.

I cleaned the building folder. I cleaned "DericedData" Folder. Restarted the Mac and Xcode.
Still, with a simple empty app I run into this error when I try to build the app onto my iPhone.
In the transcript there is no other error than this one

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftRemoteMirror.dylib to /Users/admin/Library/Developer/Xcode/DerivedData/Test-flkekjsfbumefvfygbfjekbbwmno/Build/Products/Debug-iphoneos/Test.app/libswiftRemoteMirror.dylib

Probing signature of /Users/admin/Library/Developer/Xcode/DerivedData/Test-flkekjsfbumefvfygbfjekbbwmno/Build/Products/Debug-iphoneos/Test.app/Frameworks/libswiftCore.dylib

/usr/bin/codesign '-r-' '--display' '/Users/admin/Library/Developer/Xcode/DerivedData/Test-flkekjsfbumefvfygbfjekbbwmno/Build/Products/Debug-iphoneos/Test.app/Frameworks/libswiftCore.dylib'

/Users/admin/Library/Developer/Xcode/DerivedData/Test-flkekjsfbumefvfygbfjekbbwmno/Build/Products/Debug-iphoneos/Test.app/Frameworks/libswiftCore.dylib: code object is not signed at all

Codesigning /Users/admin/Library/Developer/Xcode/DerivedData/Test-flkekjsfbumefvfygbfjekbbwmno/Build/Products/Debug-iphoneos/Test.app/Frameworks/libswiftCore.dylib

/usr/bin/codesign '--force' '--sign' '6FB0700F4ED289E49BB370D80DC9AAB1377117CF' '--verbose' '/Users/admin/Library/Developer/Xcode/DerivedData/Test-flkekjsfbumefvfygbfjekbbwmno/Build/Products/Debug-iphoneos/Test.app/Frameworks/libswiftCore.dylib'

error: Task failed with exit 0 signal 4 {

The automatically managed signing shows no error.

Is there anything new meanwhile for this problem? I'm having exactly the same issue and can't find anything that helps. I opened a bugreport 4 weeks ago, but no answer yet.

Some general advice:

  • If you have filed a bug about this already, please post the bug number, just for the record.

  • Create a new test project from one of the built-in templates (something simple, like the iOS > Single View App template) and verify that the problem happens with that.

  • If so, post a detailed build transcript, per QuinceyMorris’s request on 27 Jul.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Following your "general advice"...


Bug report number: 43327181

Description:

Area: Xcode

Summary: I created a blank "Hello World" single page app. This runs on simulator, but not on my real device.

Steps to Reproduce: Create new project. Leave all defaults. Run on iPhone 8, iOS 11.4.


Expected Results: Show blank screen.


Actual Results:

Codesigning /Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib /usr/bin/codesign '--force' '--sign' '82F025A538B4126E06BD4EEB2E3D8A570CAB680C' '--verbose' '/Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib' error: Task failed with exit 0 signal 4 { /usr/bin/codesign '--force' '--sign' '82F025A538B4126E06BD4EEB2E3D8A570CAB680C' '--verbose' '/Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib' }


Configuration: Xcode 9.4.1., iPhone 8, iOS 11.4


SInce the full report is lengthy, here is what I understand to be the relevant part of it:


Probing signature of /Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib

/usr/bin/codesign '-r-' '--display' '/Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib'

/Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib: code object is not signed at all

Codesigning /Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib

/usr/bin/codesign '--force' '--sign' '82F025A538B4126E06BD4EEB2E3D8A570CAB680C' '--verbose' '/Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib'

error: Task failed with exit 0 signal 4 {

/usr/bin/codesign '--force' '--sign' '82F025A538B4126E06BD4EEB2E3D8A570CAB680C' '--verbose' '/Users/lothar/Library/Developer/Xcode/DerivedData/HelloWorld9-figpaviwckxwcrelzlgaeasefgbw/Build/Products/Debug-iphoneos/HelloWorld9.app/Frameworks/libswiftCore.dylib'

}


As you can see: very similar, if not exactly the same as reported by stephanfrommannheim.


Thx for helping.