Swift stdlib tool error - the specified item could not be found in keychain

I have a flutter application that used ObjectiveC as a base, than I've added some libs that are SWIFT based, so I switched the SWIFT support on, and from it all the troubles began. I've added a SWIFT support adding the following lines to the Podfile:


config.build_settings['SWIFT_VERSION'] = '4.2'

and


target 'Runner' do 
use_frameworks!

This actions removed all swift-lib related errors, but now I receive the error above about the codesiging. The application is successfully executed on the simulator, but fails on my devices and CMD+B: Swift stdlib tool error: the specified item could not be found in the keychain. Task failed with exit 1 signal 0 on the step of copying Swift libraries to the build.


Probing signature of /Users/alutikova/Library/Developer/Xcode/DerivedData/Runner-bwqlfsixhrzgsfakfinzgchwtvci/Build/Products/Debug-iphoneos/Runner.app/Frameworks/libswiftCoreGraphics.dylib
  /usr/bin/codesign '-r-' '--display' '/Users/alutikova/Library/Developer/Xcode/DerivedData/Runner-bwqlfsixhrzgsfakfinzgchwtvci/Build/Products/Debug-iphoneos/Runner.app/Frameworks/libswiftCoreImage.dylib'
  /usr/bin/codesign '-r-' '--display' '/Users/alutikova/Library/Developer/Xcode/DerivedData/Runner-bwqlfsixhrzgsfakfinzgchwtvci/Build/Products/Debug-iphoneos/Runner.app/Frameworks/libswiftCoreGraphics.dylib'
error: The specified item could not be found in the keychain.
Probing signature of /Users/alutikova/Library/Developer/Xcode/DerivedData/Runner-bwqlfsixhrzgsfakfinzgchwtvci/Build/Products/Debug-iphoneos/Runner.app/Frameworks/libswiftFoundation.dylib
  /usr/bin/codesign '-r-' '--display' '/Users/alutikova/Library/Developer/Xcode/DerivedData/Runner-bwqlfsixhrzgsfakfinzgchwtvci/Build/Products/Debug-iphoneos/Runner.app/Frameworks/libswiftFoundation.dylib'
error: The specified item could not be found in the keychain.
error: The specified item could not be found in the keychain.
error: The specified item could not be found in the keychain.


I've read the information about this error and tried the following:

  1. Resetting the login keychain
  2. Entering the login keychain password in a prompt with "Always allow"
  3. Deleting Derived data
  4. Reinstalling xcode
  5. Restarting macOS a million times
  6. Moving a developer cert to System keychain
  7. Creating a completely new apple ID and all certificaties

Nothing helped, the error is this here and is the same. To be more exact, the clean single screen Swift application from the Xcode build correctly.

Any help would be greatly appreciated, since I'm completely stuck.

Accepted Reply

Okay, the only solution that helped is the one described in this thread: https://forums.developer.apple.com/message/325197#325197


Hope that helps someone and saves hours of struggling 🙂

Replies

Okay, the only solution that helped is the one described in this thread: https://forums.developer.apple.com/message/325197#325197


Hope that helps someone and saves hours of struggling 🙂