Xcode can't sign apps anymore

Today I updated to Xcode 10.1 (Build 10B61). Now I cannot run a single app in Debug mode on my devices. I always get the following error:


/usr/bin/codesign --force --sign ... --verbose /Users/.../AppName-ejqufizhohhqtsfbcwkjvtmownxv/Build/Products/Debug-iphoneos/AppName.app/Frameworks/libswiftDispatch.dylib
error: The specified item could not be found in the keychain.


If I run the exact same command in the Terminal it shows no errors at all.


If I run the command

security find-identity -p codesigning

then I see the identity and it shows that the identity is valid. What happend to Xcode since the last update and how can I fix it? I already removed access to the identity in Keychain. Xcode asked for permission the next time I tried to run the app on the device. But I still get the same error.


BR

Björn

Accepted Reply

Were you using a corporate cardreader when it didn't work. It seems that certificates on card readers interfere with code signing if the card is inserted when building.

Replies

The problem resolved itself. It seems that the corporate network I was connected to blocked some connections. I guess Xcode was not able to download provisioning profiles or other necessary files. But Xcode did not show any errors regarding profile management, in fact it seemed to have successfully downloaded everything.

In a private WiFi network everything worked fine again. Very strange behavoir.

Were you using a corporate cardreader when it didn't work. It seems that certificates on card readers interfere with code signing if the card is inserted when building.

Thanks for follow up.


Don't forget to mark your own answer as correct to close the thread.