XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.74k stars 130 forks source link

How to ignore macOS require password when execute fastlane xcodes command? #269

Closed haphanquang closed 8 months ago

haphanquang commented 1 year ago

According to the documentation at https://docs.fastlane.tools/actions/xcodes/, I ran the command on Jenkins:

bundle exec fastlane run xcodes version:14.2.0

However, my build got stuck. I suspect it's asking for the macOS password, but there is no input interface in the Jenkins pipeline. I have already installed two Xcodes on the Jenkins machine, version 13.4.0 and 14.2.0, with the default Xcode being version 13.4.0. I would like to use Xcode 14.2.0 for building a specific branch.

cmdrsabre commented 1 year ago

as soon as I add an xcodes(version: "...") in my Fastfile and the selected version is not matching this, the gitlab-runner get's stuck with $ /opt/homebrew/bin/xcodes install '14.2' --update --select and I assume this is also because this commands asks for a password, although the runner has super user privileges and the selected version is already installed.

haphanquang commented 12 months ago

I'm still facing this issue. I switched to Gitlab CI and run builds via shell runner. Cannot pass xcodes lane.

VasileiosDiamantidis commented 9 months ago

Hi @haphanquang if you already installed the Xcode on Jenkins you can use the select_for_current_build_only parameter to true. Based on the documentation "does not change the global Xcode version, which would require sudo permissions — when this option is true, this action doesn't require sudo permissions"

haphanquang commented 8 months ago

Thanks @VasileiosDiamantidis you're saver.

mieliespoor commented 8 months ago

For you guys using GitLab here - do you use artifact / caches stored in aws s3? If so, I have a few questions. If you could reach out it would be great.