errSecInternalComponent when building for physical device iPhone 7

I can build and run my app on the simulator in Xcode but can't build it for my iPhone. Can you help me out with the error message below?


I'm using Xcode Version 9.3.1 (9E501). Thank you for you help.


Kind regards,

Michel



CopySwiftLibs /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app

cd /Users/michelroserens/Desktop/CM2

export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer

export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk

builtin-swiftStdLibTool --copy --verbose --sign A096C14558D812AECB559E3B29B66C80BA1CCCF1 --scan-executable /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/CM2 --scan-folder /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks --scan-folder /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/PlugIns --platform iphoneos --toolchain /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain --destination /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks --strip-bitcode --resource-destination /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app --resource-library libswiftRemoteMirror.dylib


Requested Swift ABI version based on scanned binaries: 6

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCore.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCore.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCore.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCore.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCoreFoundation.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCoreFoundation.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCoreFoundation.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCoreFoundation.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCoreGraphics.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCoreGraphics.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCoreGraphics.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCoreGraphics.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCoreImage.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCoreImage.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftCoreImage.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCoreImage.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftDarwin.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftDarwin.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftDarwin.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftDarwin.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftDispatch.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftDispatch.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftDispatch.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftDispatch.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftFoundation.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftFoundation.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftFoundation.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftFoundation.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftMetal.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftMetal.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftMetal.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftMetal.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftObjectiveC.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftObjectiveC.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftObjectiveC.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftObjectiveC.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftQuartzCore.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftQuartzCore.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftQuartzCore.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftQuartzCore.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftUIKit.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftUIKit.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftUIKit.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftUIKit.dylib'

Copying /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftos.dylib to /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftos.dylib

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bitcode_strip '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/libswiftos.dylib' '-r' '-o' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftos.dylib'

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

Probing signature of /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCore.dylib

/usr/bin/codesign '-r-' '--display' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCore.dylib'

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

Codesigning /Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCore.dylib

/usr/bin/codesign '--force' '--sign' 'A096C14558D812AECB559E3B29B66C80BA1CCCF1' '--verbose' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCore.dylib'

/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCore.dylib: errSecInternalComponent

error: Task failed with exit 1 signal 0 {

/usr/bin/codesign '--force' '--sign' 'A096C14558D812AECB559E3B29B66C80BA1CCCF1' '--verbose' '/Users/michelroserens/Library/Developer/Xcode/DerivedData/CM2-eskevimabbxkiiarwaiqklasgsrn/Build/Products/Debug-iphoneos/CM2.app/Frameworks/libswiftCore.dylib'

}

+1

What do you mean by "+1"?

Problem solved. I bought the developer licence and then loaded a new certificate. Now it works. Best regards, Michel

Dropping this here in the hope that it improves the chances of folks finding it: Resolving errSecInternalComponent errors during code signing

errSecInternalComponent when building for physical device iPhone 7
 
 
Q