[ 
https://issues.apache.org/jira/browse/CB-5093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13971568#comment-13971568
 ] 

ASF subversion and git services commented on CB-5093:
-----------------------------------------------------

Commit 396b4f9628db3faa022cea1a18dd57fd8da13964 in cordova-cli's branch 
refs/heads/master from [~kamrik]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=396b4f9 ]

CB-5093: Add versionCode and CFBundleVersion during prepare

The version can be given as part of the <widget> tag.
Example:
<widget
        id="io.cordova.hellocordova" version="0.0.1"
        android-versionCode="7"
        ios-CFBundleVersion="3.3.3"
        ...

If not specified in the widget tag, the following defaults will be used.
Assuming version = "MAJOR.MINOR.PATCH-whatever"
versionCode = PATCH + MINOR * 100 + MAJOR * 10000
CFBundleVersion = "MAJOR.MINOR.PATCH"

Not adding the "other" version for windows platforms at this stage.
It's is in
Properties/AssemblyInfo.cs which we currently don't modify.
[assembly: AssemblyVersion("1.0.0.0")]

For more info about the "other" versions see:
http://developer.android.com/tools/publishing/versioning.html
http://stackoverflow.com/questions/4933093/cfbundleversion-in-the-info-plist-upload-error


> CLI builds version number inconsitently between iOS and Android
> ---------------------------------------------------------------
>
>                 Key: CB-5093
>                 URL: https://issues.apache.org/jira/browse/CB-5093
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, CLI, iOS
>    Affects Versions: 3.1.0
>            Reporter: Adam George
>            Assignee: Braden Shepherdson
>
> I'm hoping this issue isn't just my ignorance, but I'm finding the app 
> version number generation via the CLI to be inconsistent and odd.
> iOS and Android both support a version number (which is what is displayed in 
> the app stores), as well as another string, which most people use as a build 
> number.
> E.g. for iOS:
> Myapp-Info.plist:
> Bundle versions string, short:   1.0.0     (this is what will show in the app 
> store)
> Bundle version:  0.0.3    (this is some other build number)
> Android:
> AndroidManifest.xml:
> android:versionCode="1" android:versionName="0.0.3"
> versionName is what shows in the stores, and versionCode is typically used 
> like a build number (as far as I can tell).
> My point is, in the cordova.xml, I only have the ability to set one of these 
> version numbers.  There is only a single "version" attribute.
> But we need two attributes, so we can set both version strings via the CLI.
> Secondly, how the "version" attribute is applied when building via the CLI is 
> inconsistent.  On iOS it's updating the "build" number, and not even touching 
> the main version number that users will see in the store.
> Whereas Android has what I would expect as the correct behaviour.
> Anyway, please let me know if I've misunderstood anything.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to