设置 DEVELOPER_DIR 和使用 xcode-select 有什么区别? [英] What is the difference between setting DEVELOPER_DIR and using xcode-select?

查看:40
本文介绍了设置 DEVELOPER_DIR 和使用 xcode-select 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置 DEVELOPER_DIR 变量优先于使用 xcode-select 但我很好奇,两者有什么区别?

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

如果我在同一台机器上运行多个 Xcode 版本,我应该使用哪个?

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

推荐答案

xcode-select 将始终在系统范围内生效.DEVELOPER_DIR 可用于 per-shell 环境.DEVELOPER_DIR 因此允许您在每个项目的基础上更精确地控制 Xcode 版本,例如在连续集成设置中.

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.

例如想象一下,您将通过 xcode-select 更改每个项目的版本,然后如果两个单独的项目构建同时运行,那么您可能会遇到问题.但是,如果您改为将每个项目/CI 环境设置为导出它自己的 DEVELOPER_DIR,那么并发构建将不成问题.

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.

这篇关于设置 DEVELOPER_DIR 和使用 xcode-select 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆