设置不同版本的 Xcode 之间的优先级

发布于 2024-12-29 04:58:32 字数 403 浏览 2 评论 0原文

在 AppleScript 脚本中,我有命令告诉应用程序“Xcode”,我想使用 Xcode 3,而它现在使用 Xcode 4。

如何在 tell application 命令中指定 Xcode 版本或为 tell application 命令设置不同 Xcode 版本之间的优先级。

不建议 xcode-select:它仅针对 xcode 控制台工具设置 Xcode 版本之间的优先级。

更新

正如@Red_Menace提到的,我们可以使用.app文件的路径或应用程序的ID。请说明是否有更好的解决方案(例如设置优先通过名称“Xcode”访问Xcode 3)。

In AppleScript script I have command tell application "Xcode" which I want to use Xcode 3, while it uses Xcode 4 now.

How to specify the Xcode version in tell application command or to set priority between different Xcode versions for tell application command.

Don't advise xcode-select: it sets priority between Xcode versions only for xcode console tools.

UPDATE

As @Red_Menace metioned we can use path to .app file or id of the application. Please say if there is a better solution (e.g. set priority to access Xcode 3 by name "Xcode").

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苯莒 2025-01-05 04:58:32

您还可以在tell语句中使用应用程序路径或ID(包标识符),例如

tell application "/Developer/Applications/Xcode.app"
       -- or --
tell application id "com.apple.Xcode" -- Xcode 3
       -- or --
tell application id "com.apple.dt.Xcode" -- Xcode 4

You can also use application paths or IDs (the bundle identifier) in the tell statement, for example

tell application "/Developer/Applications/Xcode.app"
       -- or --
tell application id "com.apple.Xcode" -- Xcode 3
       -- or --
tell application id "com.apple.dt.Xcode" -- Xcode 4
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文