Xcode, Codesign Error from Jenkins / SSH - "User Interaction is not allowed" Xcode, Codesign Error from Jenkins / SSH - "User Interaction is not allowed" ios ios

Xcode, Codesign Error from Jenkins / SSH - "User Interaction is not allowed"


SSH is not supported by Apple to run automated build as they are headless, so running via SSH could be the issue here:

The context provided by LaunchDaemons is not supported for running GUI applications. The SSH service, and the default setup for Jenkins, are both implemented as LaunchDaemons. In earlier versions of Xcode 5 xcodebuild could run tests on the iOS simulator in this context, but that was never a supported configuration, and as you have noted that is no longer working as of Xcode 6.

Unlike LaunchDaemons, LaunchAgents provide a context where you can run GUI applications - if the user is logged in at the time, with a window server / Aqua session. Converting your Jenkins configuration from being a LaunchDaemon to being a LaunchAgent would avoid the reported issue. You can also use launchd for running tests on the iOS simulator from a SSH session, either by crafting a LaunchAgent and manually loading / starting that, or by using "launchctl submit”.

Have you tried using web agent instead?


Just in case anyone missed it. The answer in the linked question resolves the issue. Basically you need to run security -v unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN". I run this before the build and the codesign succeeds.


Put your keys in the System keychain instead of Login/iCloud/Local Items.