Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15040] Tooling: Allow version number validation to be skipped

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-12-07T02:20:06.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 20, 2013 Sprint 20 Core, 2013 Sprint 25, 2013 Sprint 25 Core, Release 3.2.0, Release 3.3.0
ComponentsTooling
Labelsn/a
ReporterShannon Hicks
AssigneeChris Barber
Created2013-09-04T15:55:32.000+0000
Updated2013-12-09T10:36:42.000+0000

Description

When I went to do an Enterprise build of an app, I got these error messages in the console:
[ERROR] :  tiapp.xml contains an invalid version "2013.09.04b"
[ERROR] :  The version may only contist of letters, numbers, dashes, underscores, pluses, and spaces.
So, either the validation broke, or the error message is incorrect. Either way, we need to fix it. I also tried "2013.09.04-2", which also failed.

Comments

  1. Kevin Coffman 2013-09-04

    This exists in 3.1.2.GA as well.
  2. Chris Barber 2013-09-04

    Your version numbers "2013.09.04b" and "2013.09.04-2" are not valid version numbers according to Apple: https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-102364-TPXREF106. The CFBundleVersion must be in the format X.Y.Z. Android "versionName" also recommends X.Y.Z, but doesn't appear to enforce it. Mobile web does not care. You could set the version number to "hello world" and it would be like "oh, hey". Here's the regex we use: /^\d+(\.\d+(\.\d+(\..+)?)?)?$/. Even if we allowed those version numbers, any segments over 3 would get cut off and be forced into the X.Y.Z format. Personally I don't like the idea of Titanium doing that. The developer should know exactly what's going on.
  3. Shannon Hicks 2013-09-04

    This is for an Enterprise app, and such apps don't need to follow the App Store requirements there. We've used this style version number pre-Ti 3.x without problems on enterprise app stores. I think a console warning would be better than preventing enterprise customers from having what they want.
  4. Chris Barber 2013-09-04

    [~iotashan] A good point you have.
  5. Chris Barber 2013-09-23

    This is fixed for Titanium SDK 3.2.0. You will need to set the Titanium CLI config variable "android.skipAppIdValidation" to true.
       ti config android.skipAppIdValidation true
       
    Note: we still validate that you have specified at least 1 character for the in the tiapp.xml and is not an empty string.
  6. Shannon Hicks 2013-09-23

    Perhaps a dumb question, but why is the property prefixed with "android"?
  7. Chris Barber 2013-09-23

    Because this is an Android specific flag. iOS will most likely also have ios.skipAppIdValidation option too, but none of our other platforms have app id issues to begin with.
  8. Shannon Hicks 2013-09-23

    That's why I'm confused then... This ticket was complaining about building for iOS, and the use-case explained how we might build iOS enterprise apps that don't have version format restrictions. This ticket needs to be reopened, then, as android.skipAppIdValidation does not address the problem.
  9. Chris Barber 2013-09-23

    Correction, iOS will have an ios.skipAppIdValidation option!
  10. Eric Merriman 2013-12-05

    It seems the PR might not have included this fix
  11. Chris Barber 2013-12-07

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5089 3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5090
  12. Chris Barber 2013-12-07

    By default app version numbers are validated in the format X.Y.Z. You can globally disable version checking by setting the following:
        ti config app.skipVersionValidation true
        
    You can set it per app by adding the following property to the tiapp.xml:
        <property name="ti.skipVersionValidation" type="bool">true</property>
        
    I've also added the ability to skip the app id validation:
        ti config app.skipAppIdValidation true
        
    and
        <property name="ti.skipAppIdValidation" type="bool">true</property>
        
  13. Chris Barber 2013-12-07

    To test: 1) create an app 2) change the to "foo" 3) build the app (any platform) and notice the error 4) add true to tiapp.xml 5) build again 6) notice no more error messages!
  14. Deepti Pandey 2013-12-09

    VERIFIED fixed USING : Appcelerator Studio: 3.2.0.201312081316 SDK:mobilesdk-3.2.0.v20131209000852 alloy: 1.3.0-beta acs: 1.0.10 npm: 1.3.2 titanium: 3.2.0-beta titanium-code-processor: 1.1.0-beta No error messages noticed related to version number validation.
  15. Deepti Pandey 2013-12-09

    Verified on Mavericks 10.9 and Windows 8.1

JSON Source