xcodebuild: error: Failed to build workspace "workspace" with scheme "scheme"

"Reason: A build only device cannot be used to run this target."

I have been having this issue for a little now and haven't been able to solve it.

I have searched for it online but havent been able to solve like others have.

Could you help by telling possible reasons why this would occur and how it could be fixed?

I can run the build fine it xcode, and have followed tutorials to get it set up through our GitHub repository.


Comment actions Permalink

Hi Jordan,

Could you please check if the build runs successfully on the same agent machine in the checkout directory via console? Please follow the guideline.

Comment actions Permalink

I need to add run it through a simulator, so I added 'clean test -sdk iphonesimulator9.1 -configuration Debug clean build' to the additional command lines in the build steps.


Please sign in to leave a comment.