“Command CodeSign failed with a nonzero exit code” is a very different error, it seems something is going wrong when you’re trying to sign your binary. Without more information it’s hard to say what it might be.
In Xcode you can probably find out more by working through the following steps (See the screenshot below)…
- Select the report navigator in the left hand pane
- Select the failed build in the same pane
- Select the sign step in the main window pane
- Select the three lines at the far right of that step
This should reveal the output of the step, from there you should hopefully have more information about what went wrong during the signing step. At a guess you’ll probably either need to sign up for a developer account from Apple or add your login details tp Xcode, alternatively there is something called “adhoc” signing which would allow you to build and run your apps/plugins on your local machine only.
This post looks like it would have some useful information to help you get started.

