我正在尝试让 Xcode 使用 Applescript 构建和运行我的项目。这是同样的问题如何使用 Applescript 构建和运行 Xcode?,但我认为这个答案可能已经过时了,因为它在我的机器上不起作用。我明白了:
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)
我在尝试将 Applescript 与 Xcode 一起使用时遇到了很大的麻烦;我找不到任何实际的文档(除了 Xcode 字典,它非常简洁),只是一些似乎不起作用的示例。任何帮助,将不胜感激。
我斗胆猜测这是苹果公司的一个不完整的实现。字典指出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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)