Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase iOS build number in Appcelerator Titanium

I'm creating distribution build directly from titanium studio to upload on iTunes Connect for Apple Testflight prerelease testing. My current app version is 1.1.1 and build number is automatically set by titanium studio to 1.1.1.

On Xcode generally the Prerelease build number (CFBundleVersion) is maintained as Integer by most developers which is a very convenient to increase by 1 each time before uploading on iTunes. From titanium studio which is not possible!

In tiapp.xml I set this

<ios>
    <plist>
        <dict>
            <key>CFBundleShortVersionString</key>
            <string>1.1.1</string>
            <key>CFBundleVersion</key>
            <string>10</string>
        </dict>
    </plist>
</ios>

After I run from Titanium Studio the generated info.plist under build folder becomes

<ios>
    <plist>
        <dict>
            <key>CFBundleShortVersionString</key>
            <string>1.1.1</string>
            <key>CFBundleVersion</key>
            <string>1.1.1</string>
        </dict>
    </plist>
</ios>

I know in appcelerator documentation they've already mentioned this, CFBundleVersion and CFBundleShortVersionString will become the same from <version> tag value in generated info.plist.

So the only way for now to use Apple Testflight for Ti app is to increase the app version (CFBundleShortVersionString) instead of build# each time it's uploaded on iTunes Connect which is definitely not a good way. From Xcode I can change the Build # but not all Ti apps would archive from xcode due to some modules and other issues.

There are lots of posts about this issue on appcelerator community but no acceptable solution yet. Has anyone got a working solution to change/increase the build# directly from Titanium Studio during creating distribution builds?

Thanks in advance.

like image 765
Adnan Avatar asked Dec 09 '22 04:12

Adnan


1 Answers

What i have found with the new iTunes/Testflight is it only regards the 1st 3 elements as the version number (e.g. 1.0.0) adding a 4th element to the this causes iTunesConnect/testflight to treat it as a build version for the same version (e.g. 1.0.0.1)

this has allowed me create a version 1.0.0 on itunesconnect and a subsequent upload for 1.0.0.1 under the same version just changed the version tag inside the tiap.xml

like image 81
eamon Avatar answered Mar 23 '23 16:03

eamon