如何使用 AppleScript 在 XCode 中创建新项目?

发布于 2024-08-26 19:57:44 字数 169 浏览 6 评论 0原文

我想使用 XCode 和 AppleScript 完成一个简单的任务:

  1. 我想创建一个新项目,
  2. 将创建的项目以所需的名称保存在所需的文件夹中。

有人可以告诉我如何使用 AppleScript 实现它吗?

谢谢,

米拉杰

I want to do a simple task with XCode and AppleScript:

  1. I want to create a new project
  2. Save created project with desired name in desired folder.

Can someone tell me how can I achieve it using AppleScript??

Thanks,

Miraaj

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

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

发布评论

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

评论(3

↘紸啶 2024-09-02 19:57:44

您无法直接执行此操作,但可以通过设置模板项目来完成此操作,然后使用该模板项目来创建新项目。 此处提供了一些关于执行此操作的有用详细信息。

You can't do this directly, but you can do it by setting up a template project which you then use to create new projects. There are some useful details on doing this here.

任谁 2024-09-02 19:57:44

gist 展示了如何使用 AppleScript 创建新的 C++ 项目。您可以调整它来创建您感兴趣的任何类型的项目。请注意,它使用 UI 脚本,这不是很友好,但这就是 Xcode 4 支持的所有内容。

This gist shows how to use AppleScript to create a new C++ project. You could probably adjust it to create whatever type of project you're interested in. Note that is uses UI scripting, which is not very friendly, but that is about all Xcode 4 supports.

北座城市 2024-09-02 19:57:44

我尝试归档相同的内容,对我来说,解决方案只是创建一个虚拟项目文件夹,找到所有位置,您必须在其中重命名项目名称(和包标识符),然后在运行脚本时只需复制此文件夹并重命名项目名称和包标识符。肮脏但容易。

I tried to archieve the same and the solution for me was just to create a dummy project folder find all places, where you have to rename the project name (and the bundle identifier) and on running your script just copy this folder and rename project name and bundle identifier. Dirty but easy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文