Search code examples
xcodemobile-centervisual-studio-app-center

Is there a convenient way to increment build numbers when building on Mobile Center?


Currently I'm using a build script in Xcode Build Phases:

#!/bin/bash
buildPlist=${INFOPLIST_FILE}
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $buildPlist)
CFBundleVersion=$(($CFBundleVersion + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" $buildPlist

Currently the build number is getting increased on every build, not very elegant.

Is there a possibility to check if the build system is running on Mobile Center to only increase the build number then?

Can't figure it out. – Help is much appreciated.


Solution

  • We are currently working on supporting pre- and post-build-scripts and auto-incrementing build numbers for Mobile Center soon. If there's any more clarification required, or you have specific requirements apart from the script above, feel free to contact us through the support channel in Mobile Center. We also update our product roadmap regularly as a reference of the progress we are making.