Closed knellr closed 1 year ago
Hey @knellr! It is possible to override the iphonesimulator
default value by passing --sdk
to xcode-project run-tests
.
Thanks for the quick response! Unfortunately I require the app to be built for simulator, but the command line to be built for macos, so I'm looking for a way to not supply the parameter at all.
Ahaa, sorry for rushing with my initial answer. As of now it is not possible to omit this parameter, but I can look into it tomorrow and see what can be done about it. I'll keep you posted.
Hi again @knellr. I've made some changes to xcode-project run-tests
in #335 and added optional --omit-sdk
switch that will make it so that the underlying xcodebuild
command will not be invoked with -sdk
argument.
To try out those changes please update the tools to test version using
python -m pip install -i https://test.pypi.org/simple/ codemagic-cli-tools==0.42.0.41
and modify your test command to
xcode-project run-tests \
--workspace "${XCODE_WORKSPACE?}" \
--scheme "${XCODE_SCHEME?}" \
--device "iPhone 12" \
--omit-sdk
Please let me know how it goes and if all is well then we can move on with the release procedure.
Hi @priitlatt, I've confirmed that this is working for us, thank you.
@knellr That is some great news. I'll push the PR to review then and hopefully we can have a proper release sometime tomorrow. Until then please keep using the test release.
@knellr, --omit-sdk
option is now available in version 0.42.0. All Codemagic VMs come equipped with this version already. If you need it somewhere else, then you can grab it from PyPI.
Hello, we're currently evaluating Codemagic. We have an iOS project using Swift Package Manager that builds a command-line tool for a build plugin. This all works fine in xcode and our current CI, but not Codemagic, I believe because of the -sdk parameter passed to xcodebuild.
This then executes:
Which results in the (macos) tool being build for iPhone Simulator, preventing it from being run:
This issue is mentioned here. https://developer.apple.com/forums/thread/650302
Is there any way to prevent xcodebuild from being run with the -sdk parameter?