Xcode build settings - how can I read the value of a custom key in Info.plist and use it in the Xcode build settings

I am trying to read the value of the user key info.plist in the customization of the assembly.

"APP_VERSION" is a macro defined in the INFOPLIST_PREPROCESSOR_DEFINITIONS file.

I am trying to make a macro definition from the INFOPLIST_PREPROCESSOR_DEFINITIONS file in the build settings based on various configurations.

Am I going to do it wrong? Or I just missed something.

info.plist custom key

build settings

+4
source share
2 answers

PlistBuddy " Script " / info.plist.

:

/usr/libexec/PlistBuddy -c 'print PRX_APP_VERSION' Info.plist

:

/usr/libexec/PlistBuddy -c "Set :BUNDLE_DISPLAY_NAME NEW_VALUE" Info.plist

, Script Build Phase, ( ), , , , ..

+2

, run script? script info.plist

0

All Articles