diff --git a/Tools/buildNumber.sh b/Tools/buildNumber.sh
new file mode 100755
index 000000000..ddc6bc8ba
--- /dev/null
+++ b/Tools/buildNumber.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+#increment build number each time we build
+
+if [[ $CONFIGURATION = "Release" ]]; then
+ buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
+ buildNumber=$(($buildNumber + 1))
+ /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
+ echo "Incremented build number to $buildNumber"
+else
+ echo "Skip build increment when building for $CONFIGURATION"
+fi
+
diff --git a/linphone-Info.plist b/linphone-Info.plist
index 0fdd418f9..04f2f867e 100644
--- a/linphone-Info.plist
+++ b/linphone-Info.plist
@@ -59,7 +59,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 2.2.4
+ 4.0.0
CFBundleURLTypes
@@ -88,7 +88,7 @@
CFBundleVersion
- 9
+ 10
LSRequiresIPhoneOS
UIApplicationExitsOnSuspend
diff --git a/linphone.xcodeproj/project.pbxproj b/linphone.xcodeproj/project.pbxproj
index bc3300f9f..6f536beee 100755
--- a/linphone.xcodeproj/project.pbxproj
+++ b/linphone.xcodeproj/project.pbxproj
@@ -3789,7 +3789,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "#increment build number each time we build\n\nbuildNumber=$(/usr/libexec/PlistBuddy -c \"Print CFBundleVersion\" \"$INFOPLIST_FILE\")\nbuildNumber=$(($buildNumber + 1))\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $buildNumber\" \"$INFOPLIST_FILE\"\n\n\n\n\n";
+ shellScript = "$SRCROOT/Tools/buildNumber.sh\n";
};
/* End PBXShellScriptBuildPhase section */