I'm in a strange situation where I can get xctool
to run my test but I cant figure out the equivalent command line to get xcodebuild
and/or fastlane scan
to run my tests.
I have an iPad only application with a single scheme and two targets (otto and ottoTests)
xctool -scheme otto \
-sdk iphonesimulator \
CODE_SIGN_IDENTITY=""\
CODE_SIGNING_REQUIRED=NO \
-reporter pretty\
-reporter junit:./test-reports/otto.xml\
build test
xcodebuild -sdk iphonesimulator \
-scheme otto \
test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
I get this error that
A build only device cannot be used to run this target
So I'm kind of at a loss here exactly what is different between xcodebuild
and whatever xctool
is running.
AFAICS, you are missing the -destination
argument in the xcodebuild
command. Refer to this tutorial for sample code.