What is the difference between setting DEVELOPER_D

2020-07-11 09:29发布

Setting the DEVELOPER_DIR variable takes precedence over using xcode-select but I'm curious, what is the difference between the two?

Which should I use if I'm running multiple Xcode versions on the same machine?

标签: xcode
1条回答
一夜七次
2楼-- · 2020-07-11 10:23

xcode-select will always take effect system-wide. DEVELOPER_DIR can be used in a per-shell environment. DEVELOPER_DIR thus allows you to have more precise control over Xcode version on a per-project basis in for example a continous integration setup.

E.g. imagine that you would have each project changing version via xcode-select, then if two separate projects builds run concurrently then you would likely have problems. But if you instead setup each project / CI environment to export it's own DEVELOPER_DIR, then concurrent builds won't be an issue.

查看更多
登录 后发表回答