Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何让Xcode使用Applescript构建和运行?_Xcode_Applescript - Fatal编程技术网

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

如何让Xcode使用Applescript构建和运行?,xcode,applescript,Xcode,Applescript,我正试图让Xcode使用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使用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)


我在尝试将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

这在理论上可能是同一个问题,但Xcode 3的AppleScript字典与Xcode 4的大不相同,因此这无论如何都不是该问题的重复。