如果我有一个不在Info.plists包中的单独的Sample.plist文件,我将如何引用Info.plists中引用的变量?
例如,{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.
有什么想法吗?
答案 0 :(得分:1)
您可以在构建阶段编写运行脚本,以便在编译时更改plist文件。