2

如果我有一个不在 Info.plist 包中的单独 Sample.plist 文件,我将如何引用 Info.plist 中引用的变量?

例如,{SOME_VARIABLE} 是在编译时根据配置文件在 Info.plists 中填充的......但在此之外的 plists 不会被替换。

例如:

ConfigurationConstants.cfg:
SOME_VARIABLE="SOME VALUE";

Info.plists/Debug.plist:
SOME_KEY = {SOME_VARIABLE} <--- this gets replaced at compile time

SomeOtherFile.plist:
SOME_OTHER_KEY = {SOME_VARIABLE} <--- this does not get replaced at compile time because it's outside of the Info.plists bundle.

有任何想法吗?

4

1 回答 1

1

您可以在构建阶段编写运行脚本以在编译时更改 plist 文件。

于 2012-10-25T23:25:21.073 回答