[TIMOB-15040] Tooling: Allow version number validation to be skipped
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-12-07T02:20:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 20, 2013 Sprint 20 Core, 2013 Sprint 25, 2013 Sprint 25 Core, Release 3.2.0, Release 3.3.0 |
Components | Tooling |
Labels | n/a |
Reporter | Shannon Hicks |
Assignee | Chris Barber |
Created | 2013-09-04T15:55:32.000+0000 |
Updated | 2013-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.
This exists in 3.1.2.GA as well.
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.
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.
[~iotashan] A good point you have.
This is fixed for Titanium SDK 3.2.0. You will need to set the Titanium CLI config variable "android.skipAppIdValidation" to true.
Note: we still validate that you have specified at least 1 character for the
Perhaps a dumb question, but why is the property prefixed with "android"?
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.
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.
Correction, iOS will have an ios.skipAppIdValidation option!
It seems the PR might not have included this fix
Master pull request: https://github.com/appcelerator/titanium_mobile/pull/5089 3.2.x pull request: https://github.com/appcelerator/titanium_mobile/pull/5090
By default app version numbers are validated in the format X.Y.Z. You can globally disable version checking by setting the following:
You can set it per app by adding the following property to the tiapp.xml:
I've also added the ability to skip the app id validation:
and
To test: 1) create an app 2) change the
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.
Verified on Mavericks 10.9 and Windows 8.1