Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

On app versioning in BlackBerry App World

Discussion in 'BlackBerry' started by whilefun, Nov 30, 2013.

  1. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    130
    Hi all,

    I just figured out a somewhat frustrating bit of work related to updating your unity app to a new version in BB App World. My initial version was 1.0.0.0 (I thought), and was uploaded successfully. However, I forgot to set my own icon in the build so I had to rebuild and resubmit.

    Two problems were encountered.

    1) My initial build was from com.CompanyName.Product name, so ALL future builds must be this lame default as well. To avoid this, I should have set the "Bundle Identifier*" field value right away in my new project under File->Build Settings->Player Settings.

    2) BlackBerry uses 4 digit version numbers, whereas Unity uses 3 digit version numbers. When trying to upload my new version (v1.0.0.1, or so I thought), I kept getting this error:

    The package version in your .bar manifest file for 1.0.0.1 must be greater than the previous version, but lower than any the next release version added to the vendor portal. Your .bar manifest file package version must be greater than 1.0. Correct your .bar manifest file and try again to continue.

    The solution to this was found after looking in the bar manifest file (under <ProjectName>\Temp\StagingArea\). I tried to manually change it here to 1.0.0.1 and rebuild, but when I did, it defaulted back to 1.0.0. The problem is that the last digit in the version number I had set in the "Bundle Version*" field in Build Settings was being ignored. So, I had typed and saved 1.0.0.1, but during the build process when the bar is generated (meaning, you cannot manually edit this file...it is stomped every build), the last .1 was being chopped off. BUT, in the version field in Unity, it remains intact, giving no errors or warnings.

    To fix this, I just changed the Bundle Version value to 1.0.1 and re-built. It then uploaded fine to App World. However, as mentioned in this thread, App World will probably append the .1 again, making it 1.0.1.1. Ugh.

    Anyway, hope this saves you some headaches. :)
     
  2. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    @brendonsmall: What version of unity are you using? In unity 4.3 I made it so you can specify a 4th version number which will be used as the build ID. The build ID is the final (4th) value displayed in the BB store. In the manifest it is shown under the build id tag and NOT the version tag. I hope that clears up some of the confusion. :)

    Also the staging area gets cleaned up when you close the editor so be careful on relying on that.
     
  3. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    130
    I am using Unity 4.3.0f4

    In my bar-descriptor.xml in both the .bar file and in the temp/StagingArea directory, there is no build id tag:

    <?xml version="1.0" encoding="UTF-8"?>
    <qnx xmlns="http://www.BB10.com/schemas/application/1.0">
    <env var="LD_LIBRARY_PATH" value="$LD_LIBRARY_PATH:app/native/lib"/>
    <author>REDACTED</author>
    <authorId>REDACTED</authorId>
    <id>com.Company.ProductName</id>
    <filename>Release/BB10Player</filename>
    <name>REDACTED</name>
    <description>Powered by Unity3D</description>
    <publisher>REDACTED</publisher>
    <versionNumber>1.0.1</versionNumber>
    <icon>
    <image>app_icon.png</image>
    </icon>
    <splashScreens>
    <image>app_splash_square.png</image>
    <image>app_splash_landscape.png</image>
    <image>app_splash_portrait.png</image>
    </splashScreens>
    <initialWindow>
    <autoOrients>false</autoOrients>
    <aspectRatio>landscape</aspectRatio>
    <systemChrome>none</systemChrome>
    <transparent>false</transparent>
    </initialWindow>
    <category>core.games</category>
    <action system="true">run_native</action>
    <action>play_audio</action>
    <action>access_internet</action>
    </qnx>

    Are you talking about another file or another tag in the bar-descriptor.xml file?

    I guess my removal of the 4th number in the build settings was not required, but it seems that the different 3rd number is still required.
     
  4. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
    If you don't specify a 4th version number the buildId tag will not populate in the bar-descriptor.xml. When you upload it to the store BlackBerry will fill it in for you (I think they default it to 1).

    Here's what the bar-descriptor.xml file looks like with the tag filled in:
    Code (csharp):
    1. ?xml version="1.0" encoding="UTF-8"?>
    2. <qnx xmlns="http://www.BB10.com/schemas/application/1.0">
    3.         <env var="LD_LIBRARY_PATH" value="$LD_LIBRARY_PATH:app/native/lib"/>
    4.         <author>-------/author>
    5.         <authorId>--------------------------</authorId>
    6.         <id>com.Company.ProductName</id>
    7.         <filename>Release/BlackBerryPlayer</filename>
    8.         <name>New Unity Project</name>
    9.         <description>Powered by Unity3D</description>
    10.         <publisher>DefaultCompany</publisher>
    11.         <versionNumber>1.2.3</versionNumber>
    12.         <buildId>4</buildId>
    13.         <icon>
    14.                 <image>app_icon.png</image>
    15.         </icon>
    16.         <splashScreens>
    17.         </splashScreens>
    18.         <initialWindow>
    19.                 <autoOrients>false</autoOrients>
    20.                 <aspectRatio>portrait</aspectRatio>
    21.                 <systemChrome>none</systemChrome>
    22.                 <transparent>false</transparent>
    23.         </initialWindow>
    24.         <category>core.games</category>
    25.         <action system="true">run_native</action>
    26.         <action>play_audio</action>
    27.         <action>access_internet</action>
    28. </qnx>
    And here's how it looks like in my player settings:
    $Screen Shot 2013-12-04 at 9.56.39 AM.png
     
  5. whilefun

    whilefun

    Joined:
    Nov 14, 2013
    Posts:
    130
    Aaaaaah. That makes sense now why I wasn't seeing the tag in my bar-descriptor (well, as much as this could make sense hehe). Thanks for the explanation! :)