gpt4 book ai didi

xcode - 如何让 Xcode 使用 Applescript 构建和运行?

转载 作者:行者123 更新时间:2023-12-04 21:49:59 24 4
gpt4 key购买 nike

我正在尝试让 Xcode 使用 Applescript 构建和运行我的项目。这是与 How to build & run Xcode with Applescript? 相同的问题,但我认为该答案可能已过时,因为它在我的机器上不起作用。我明白了:

execution error: Xcode got an error: The specified object is a property, not an element. (-10008)

我还尝试了以下方法:
tell application "Xcode"
build project "MyProject"
end tell

但它不会构建,它只会返回“缺失值”。

(使用 Xcode 4.0.1,OS X 10.6.8)

我在尝试在 Xcode 中使用 Applescript 时遇到了很多麻烦;我找不到任何实际的文档(除了非常简洁的 Xcode 字典),只是一些似乎不起作用的示例。任何帮助,将不胜感激。

最佳答案

我冒昧地猜测,这对 Apple 来说是一个不完整的实现。字典指出 build应该返回一个值,但没有返回任何内容,Xcode 什么也不做。下面的代码完全符合字典,但它也不起作用。

tell application "Xcode"
set theProject to project 1
set theBuildConfigType to build configuration type 2 of theProject -- "Debug"
set projectBuilt to build theProject using theBuildConfigType without static analysis and transcript
end tell

仅供引用这里是每个脚本调试器的语法:
set theResult to build reference ¬
static analysis boolean ¬
transcript boolean ¬
using build configuration type

关于xcode - 如何让 Xcode 使用 Applescript 构建和运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6686802/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com