Here is the error details I received when using the plistbuddy script:
Set: Entry, ":CFBundleBuildVersionString", Does Not Exist
File Doesn't Exist, Will Create: /Users/*YourFilePathHere/YourAppName*.app/Info.plist
Set: Entry, ":CFBundleBuildDateVersionString", Does Not Exist
Command /bin/sh failed with exit code 1
clean and even deleted
Derived Data without success. Turns out the actual solution was quite simple. I found that during
build the script was trying to add the generated values to the
plist before the
plist was actually generated by Xcode.
Targets > Build Phases > Extra Version Data is there this script is ran.
Targets > Build Phases > Copy Bundle Resources is where the
plist is generated.
Click and drag
Extra Version Data so that it becomes listed after
Copy Bundle Resources thus, the
plist is built BEFORE the script tries to add the generated values.
build and rejoice with a beer.
(Using Xcode 5.1)
Also posted on Stack Overflow