Sync build versions between targets
I've been working for a while on a new project (stay tuned!) which has a watch app. Up until now I used a script that automatically increases the build number of the app, based on the value in Info.plist:
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"This works really well, but the problem with watch targets is that the build number has to be the same for all targets. First idea was to just add this build script to all targets, which might work well, but it just felt wrong.