Xcode 10, Command CodeSign failed with a nonzero exit code

Solution 1:

I had that problem and Xcode failed to compile on the device, but on simulator, it worked fine.

I solved with these steps:

  1. Open keychain access.
  2. Lock the 'login' keychain.
  3. Unlock it, enter your PC account password.
  4. Clean Project in the product menu.
  5. Build it Again.

And after that everything works fine.

Solution 2:

None of the listed solutions worked for me. In another thread it was pointed out that including a folder named "resources" in the project causes this error. After renaming my "resources" folder, the error went away.