Highlighted

Build Number in AIR iOS

Explorer ,
Sep 26, 2015

Copy link to clipboard

Copied

Long time ago I found out that you used <versionNumber> to populate both keys in CFBundleShortVersionString and CFBundleVersion in info.plist. I was disappointed that I have to write some weird script to overcome this issue.

---

#/bin/bash

ORIGINAL_FILE="$1"

NEW_FILE="$1"

VERSION="$2"

BUILD="$3"

unzip -q "$ORIGINAL_FILE" -d temp

/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" temp/Payload/*.app/Info.plist

/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD" temp/Payload/*.app/Info.plist

codesign -f -s "XXXXXX" --entitlements "Entitlements.plist" temp/Payload/*.app

pushd temp > /dev/null

zip -qry ../temp.ipa *

popd > /dev/null

mv temp.ipa "$NEW_FILE"

rm -rf "temp"

---

Then I read this in AIR 18 and I was happy that you finally fixed this issue.

Build Number in AIR iOS

This feature will allow developers to update only the build number while keeping the version number same so that their application is available quickly on Testflight for beta testing. Now  <versionLabel> tag will be used to populate CFBundleShortVersionString and <versionNumber> for CFBundleVersion. Previously we used only <versionNumber> to populate both the keys in info.plist. CFBundleShortVersionString will be the final release version application version of the application. This is useful in case of TestFlight because if developers do only minor changes in application , then they can only update CFBundleVersion to skip the app review phase by Apple(which is time consuming).

But now I am a little disappointed again. Why have you used limited <0-999>.<0-999>.<0-999> <versionNumber> to fill CFBundleVersion? We have use the last number as build number and are currently on 5834. So I am unable to remove script we are using because I get error 105: application.versionNumber contains an invalid value. Could you please at least remove the limitation of <versionNumber>.  There is no limit in CFBundleVersion as you can see in IOS documentation. Or you could make it much simpler by allowing <iPhone><InfoAdditions> to contain these CFBundleVersion and CFBundleShortVersionString for those who knows what are they doing and do whatever you want with <versionNumber> or <versionLabel>. Thank you very much.

CFBundleVersion

CFBundleVersion (String - iOS, OS X) specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle. The build version number should be a string comprised of three non-negative, period-separated integers with the first integer being greater than zero. The string should only contain numeric (0-9) and period (.) characters. Leading zeros are truncated from each integer and will be ignored (that is, 1.02.3 is equivalent to 1.2.3). This key is not localizable.

TOPICS
Air beta

Views

839

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Build Number in AIR iOS

Explorer ,
Sep 26, 2015

Copy link to clipboard

Copied

Long time ago I found out that you used <versionNumber> to populate both keys in CFBundleShortVersionString and CFBundleVersion in info.plist. I was disappointed that I have to write some weird script to overcome this issue.

---

#/bin/bash

ORIGINAL_FILE="$1"

NEW_FILE="$1"

VERSION="$2"

BUILD="$3"

unzip -q "$ORIGINAL_FILE" -d temp

/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $VERSION" temp/Payload/*.app/Info.plist

/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD" temp/Payload/*.app/Info.plist

codesign -f -s "XXXXXX" --entitlements "Entitlements.plist" temp/Payload/*.app

pushd temp > /dev/null

zip -qry ../temp.ipa *

popd > /dev/null

mv temp.ipa "$NEW_FILE"

rm -rf "temp"

---

Then I read this in AIR 18 and I was happy that you finally fixed this issue.

Build Number in AIR iOS

This feature will allow developers to update only the build number while keeping the version number same so that their application is available quickly on Testflight for beta testing. Now  <versionLabel> tag will be used to populate CFBundleShortVersionString and <versionNumber> for CFBundleVersion. Previously we used only <versionNumber> to populate both the keys in info.plist. CFBundleShortVersionString will be the final release version application version of the application. This is useful in case of TestFlight because if developers do only minor changes in application , then they can only update CFBundleVersion to skip the app review phase by Apple(which is time consuming).

But now I am a little disappointed again. Why have you used limited <0-999>.<0-999>.<0-999> <versionNumber> to fill CFBundleVersion? We have use the last number as build number and are currently on 5834. So I am unable to remove script we are using because I get error 105: application.versionNumber contains an invalid value. Could you please at least remove the limitation of <versionNumber>.  There is no limit in CFBundleVersion as you can see in IOS documentation. Or you could make it much simpler by allowing <iPhone><InfoAdditions> to contain these CFBundleVersion and CFBundleShortVersionString for those who knows what are they doing and do whatever you want with <versionNumber> or <versionLabel>. Thank you very much.

CFBundleVersion

CFBundleVersion (String - iOS, OS X) specifies the build version number of the bundle, which identifies an iteration (released or unreleased) of the bundle. The build version number should be a string comprised of three non-negative, period-separated integers with the first integer being greater than zero. The string should only contain numeric (0-9) and period (.) characters. Leading zeros are truncated from each integer and will be ignored (that is, 1.02.3 is equivalent to 1.2.3). This key is not localizable.

TOPICS
Air beta

Views

840

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 26, 2015 0

Have something to add?

Join the conversation