Xcode将$ {PRODUCT_NAME}存储在文件系统上的什么位置? [英] Where does Xcode store ${PRODUCT_NAME} on the file system?

查看:98
本文介绍了Xcode将$ {PRODUCT_NAME}存储在文件系统上的什么位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

参考此问题在哪里被问到要在Xcode本身中找到$ {PRODUCT_NAME},我想知道Xcode将$ {PRODUCT_NAME}的值存储在文件系统中的哪个位置(因此在哪个文件中)?

Referring to this question where it was asked where to find ${PRODUCT_NAME} in Xcode itself, I would like to know where (so in which file) Xcode stores the value of the ${PRODUCT_NAME} on the file system?

我想编写一个构建脚本,该脚本能够在不使用 Xcode 的情况下自动访问此变量并更改产品名称.

I want to write a build script that is able to automatically access this variable and change the product name without using Xcode.

推荐答案

它位于MyProject.xcodeproj/project.pbxproj中.

It's in MyProject.xcodeproj/project.pbxproj.

尽管在这种情况下,您可能会发现实际上不更改PRODUCT_NAME而是通过更改您使用PRODUCT_NAME的含义来更好地为您服务.即使那样,您可能仍然会发现最好的方法是使用具有公共格式的.xcconfig文件,而不是具有相当神秘的NextStep格式的pbxproj文件.

Although in this case you'll probably find you're better served by not actually changing the PRODUCT_NAME, but by changing whatever it is you're using PRODUCT_NAME for. Even then you'll probably find that the best approach is to use an .xcconfig file, which has a public format instead of the pbxproj file which has a rather arcane NextStep format.

这篇关于Xcode将$ {PRODUCT_NAME}存储在文件系统上的什么位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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