简体   繁体   中英

Manage Xcode Command Line Tools version for each user

I am using two different Xcode version with 2 different Command Line Tools version as well. On my Mac I have one user for development and the other one as a Jenkins slave and, for some reasons that don't belong here, I need to use different Command Line Tools version for each user. The thing is that every time I select a new Build Tools version, changes apply to all users.

Is there any way to select Build Tools version for EACH user?

The most direct way to solve yout problem would be using the environment var $DEVELOPER_DIR, as you can see here:

What is the difference between setting DEVELOPER_DIR and using xcode-select?

You can try to use this wrapper. It allows you to execute xcode-select without sudo permissions:

https://github.com/detroit-labs/safe-xcode-select

Alternatively, if that doesn't work for you, you can try allowing xcode-select to be executed with sudo permissions but without the password:

https://encyclopediaofdaniel.com/blog/sudo-without-a-password/

I hope it helps.

Find your toolchain name (say swift-dev ) and then run:

export TOOLCHAINS=swift-dev

on login?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM