Brian Liang
Brian Liang

Reputation: 7774

Referencing configuration variables in info.plist in another plist file

If i have a separate Sample.plist file that is not within the Info.plists bundle, how would I reference the variables referenced in Info.plists?

For example, The {SOME_VARIABLE} are filled in at compile time in Info.plists based on the Configuration file... but plists outside of that won't get replaced.

eg:

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.

Any ideas?

Upvotes: 2

Views: 607

Answers (1)

g.revolution
g.revolution

Reputation: 12262

You can write a run script in build phase to change the plist files at compile time.

Upvotes: 1

Related Questions