以编程方式重命名 XCode 项目 [英] Programmatically rename an XCode project

查看:31
本文介绍了以编程方式重命名 XCode 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以通过缓慢双击项目名称来重命名项目,但是我想知道是否可以通过命令行(任何语言,可能是 Apple 脚本)自动执行此操作?

I know one can rename a project by slowly double clicking the project name but I was wondering if it's possible to automate that through the command line (any language, possibly Apple Script) ?

推荐答案

您将不得不操作 XML 格式的 .xcodeproj 文件.

You will have to manipulate the .xcodeproj file, which is in XML format.

在我的构建过程中,我有占位符名称,我只需搜索 &替换为命令行应用程序.如果您需要通用解决方案,则必须解析 XML 格式(该格式没有文档记录但并不难掌握).

In my build process I have placeholder names that I simply search & replace with a command line app. If you need a generic solution you will have to parse the XML format (which is undocumented but not that hard to grasp).

这篇关于以编程方式重命名 XCode 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆