Using info.plist for storing target-specific values for a multi-target app

前端 未结 1 885
粉色の甜心
粉色の甜心 2021-02-12 17:02

I have a multi-target iPhone app which currently includes a header file with constant definitions that are conditionally included at build time depending on which target is bein

相关标签:
1条回答
  • 2021-02-12 17:22

    It is acceptable and suitable.

    The Info.plist file is preprocessed (must be enabled in project settings by setting Packaging / Preprocess Info.plist File to Yes) by the C pre-processor, so you can have variables (in the form of ${VARIABLE_NAME}). These variables can be defined in the User Defined section in Xcode's target info, making it very easy to switch their value from one target to another.

    0 讨论(0)
提交回复
热议问题