加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-14 19:06:34 所属栏目:百科 来源:网络整理
导读:我试图让 Xcode使用Applescript构建和运行我的项目.这是与 How to build run Xcode with Applescript?相同的问题,但我认为答案可能已过时,因为它在我的机器上不起作用.我明白了: execution error: Xcode got an error: The specified object is a property,
我试图让 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的一个不完整的实现.字典表明构建应该返回一个值,但不返回任何内容,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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读