iOS版:在构建阶段改变的info.plist [英] iOS: Changing info.plist during build phase

查看:239
本文介绍了iOS版:在构建阶段改变的info.plist的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做到以下几点:


  1. 在构建阶段,打开一个纯文本文件和文字

  2. 在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:


  1. 写这是第一个集结阶段之前运行shell脚本。让这个脚本设置环境变量。

  2. 启用的展开生成设置在Info.plist中<​​/ em>的为你的项目。

  3. 使用环境变量如 $ plist文件{MY_COOL_SETTING}

  1. Write a shell script that is run before the first build-phase. Let this script set an environment variable.
  2. Enable "Expand Build Settings in Info.plist" for you project.
  3. Use the environment variable in the plist file like ${MY_COOL_SETTING}.

这篇关于iOS版:在构建阶段改变的info.plist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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