iOS版:在构建阶段改变的info.plist [英] iOS: Changing info.plist during build phase
本文介绍了iOS版:在构建阶段改变的info.plist的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图做到以下几点:
- 在构建阶段,打开一个纯文本文件和文字
- 在info.plist中更改属性的值在步骤1中得到的值。
我可以写一个shell脚本这个?
Can I write a shell script for this?
这将是巨大的,如果有人能指导我实现这一目标。
It will be great if someone can guide me to achieve this.
推荐答案
当然可以。我会做的三个步骤:
Yes you can. I would do it in three steps:
- 写这是第一个集结阶段之前运行shell脚本。让这个脚本设置环境变量。
- 启用的展开生成设置在Info.plist中</ em>的为你的项目。
- 使用环境变量如
$ plist文件{MY_COOL_SETTING}
。
- Write a shell script that is run before the first build-phase. Let this script set an environment variable.
- Enable "Expand Build Settings in Info.plist" for you project.
- Use the environment variable in the plist file like
${MY_COOL_SETTING}
.
这篇关于iOS版:在构建阶段改变的info.plist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文