I am attempting to read a custom info.plist key's value into a User Defined Build Setting.
The 'APP_VERSION' is a macro defined in my INFOPLIST_PREPROCESSOR_DEFINITIONS file.
What I am trying to accomplish is getting macro definitions from my INFOPLIST_PREPROCESSOR_DEFINITIONS file into build settings based on different configurations.
I am going about this the wrong way? Or am I just missing something.
You can use the
PlistBuddy
command in a 'Run Script Build Phase' to read and/or write values in your info.plist file.To read:
To write:
So in your Run Script Build Phase, read the value (or values) you want, store them into variables using standard shell scripting, modify as required, then write the values back to the new keys etc.