Mark (et al.), I think I ran into the same problem that you encountered, and I will try to describe it in one sentence, and then explain:
I think that / usr / libexec / PlistBuddy, when launched from inside Xcode, works with cached versions of Info.plist data, and therefore, what is finally written to execute on a device or simulator is not always what you want.
I tried to write the message “Copy Resource Bundle” “Launch Scripts” to change this information so that it does not change in my local git repository, only to detect this, while the information will work correctly when the PlistBuddy commands were executed in the window terminal.app next to Xcode, if not done, cached values will be written.
I finally resigned myself to running the scripts for generating version information before the Copy Bundle Resources stage, and simply made automatic changes to another Run Script, using the same tags for the git message and for git that are automatically created. for the Settings.bundle / Root.plist file, and not for fixing it every time, I chose to just run a script finalization that would execute 'git checkout - $ {PROJECT} /Resources/Settings.bundle/Root.plist' (where there is mine, but it may not be where everyone puts their own system settings resource file).
between checking for changes, running its parts during installation and its parts each time and with the final script at the end, there are 6 scripts for some purposes and 7 for another ...
... but what matters to me is that it is finally automatically automated ... and turns around what PlistBuddy does with my plist files when processed inside Xcode.
source share