I received the following email from Apple when I submit an app update:
We have discovered one or more issues with your recent delivery for \"Project
My solution is:
For CFBundleShortVersionString:
CFBundleVersion: you could do the same for CFBundleVersion, but somehow I wanted this value to be computed from my GIT repo commit count. I´ve done it like this:
\#!/bin/sh INFOPLIST="${SRCROOT}/MyApp/MyApp-Info.plist" INFOPLIST_WKAPP="${SRCROOT}/MyApp-WKApp/Info.plist" INFOPLIST_WKEXT="${SRCROOT}/MyApp-WKExt/Info.plist" PLISTCMD="Set :CFBundleVersion $(git rev-list --all|wc -l)" echo -n "$INFOPLIST" | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD" echo -n "$INFOPLIST_WKAPP" | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD" echo -n "$INFOPLIST_WKEXT" | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"
\#!/bin/sh INFOPLIST="${SRCROOT}/MyApp/MyApp-Info.plist" INFOPLIST_WKAPP="${SRCROOT}/MyApp-WKApp/Info.plist" INFOPLIST_WKEXT="${SRCROOT}/MyApp-WKExt/Info.plist" PLISTCMD="Set :CFBundleVersion SCRIPTED" echo -n "$INFOPLIST" | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD" echo -n "$INFOPLIST_WKAPP" | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD" echo -n "$INFOPLIST_WKEXT" | xargs -0 /usr/libexec/PlistBuddy -c "$PLISTCMD"