[TIMOB-23649] Use per-platform moduleAPIVersions in the SDK manifest.json
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-04T13:52:25.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.0.0 |
Components | Core |
Labels | n/a |
Reporter | Ashraf Abu |
Assignee | Christopher Williams |
Created | 2016-07-14T07:38:09.000+0000 |
Updated | 2018-08-06T17:49:18.000+0000 |
Description
We need the ability to version the module API's at the platform level (and not globally). We updated Android/V8 so only need to bump the moduleAPIVersion to 3 there, but retain 2 on iOS. For the SDK, this involves using an object value for "moduleAPIVersion" property. I propose that the object have the platform ids as the keys and the api version as the value, like so:
{
"name": "6.0.0.v20160717220907",
"version": "6.0.0",
"moduleAPIVersion": {
"iphone": "2",
"android": "3",
"mobileweb": "2"
},
"timestamp": "7/18/2016 05:13",
"githash": "e31eb5e",
"platforms": [
"iphone",
"android",
"mobileweb"
]
}
[~msamah] [~cng] -
moduleAPIVersion
is need to be updated to3
with SDK 6.0 This can be found inmanifest.json
in titanium mobile SDK home directory.Thank you for the findings.
Exact location https://github.com/appcelerator/titanium_mobile/blob/02620f76c6fbcfb35f40eb2254380d90f3e81d02/package.json#L5
[~cwilliams] for your PR update here: https://github.com/appcelerator/titanium_mobile/commit/881c045d606d1da22a2264e60ce6c6c902181c50#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R5 You also included
"moduleApiVersion": 2,
. With the new modules having apiversion 3, they aren't detected in studio. Is this something we need to update to 3? And if so, it would render modules with apiversion 2 (both iOS and Android I believe) to not be useable. Please correct me if I'm wrong in understanding this. Basically right now, modules compiled in apiversion 3 aren't detected in Studio.Ok, so I see the issue here. Studio is enforcing the moduleAPIVersion value in the SDK's manifest.json matches the moduleAPIVersion in the modules. The problem here is that Studio is the only one enforcing that, and that we need moduleAPIVersion to actually be platform-specific now - since the API didn't change for iOS, but did for Android. See TIMOB-23550 I think we should add an enhancement request to Studio to have it understand the old "global" moduleAPIVersion for the SDK, or a newer platform-specific listing, one that might look like this:
https://github.com/appcelerator/titanium_mobile/pull/8140
To test this, use the latest Studio with the latest 6.0.0. Add this module to an Android project https://github.com/appcelerator-modules/ti.imagefactory/releases/tag/android-3.0.0 The v3.0.0 module should appear in the tiapp.xml overview modules when you click the add button and you should be able to add it.
Just a note, not sure if it's me but after compiling latest master of TiSDK, the
manifest.json
file showed:which prevented any ApiVersion 3 module from being used. Instead, it should have shown something like this:-
Adding this comment because it seems to be just me for now facing this when compiling the master branch.
[~cwilliams] Checked with Kondal, studio checks the values in
manifest.json
. The PR changes changed thepackage.json
. From what I can see,package.json
's values for "moduleApiVersion" is being copied over tomanifest.json
but it is copying it wrongly. Instead of the correct key values, it's copied as[object Object]
.[~cwilliams] I reopened the ticket. Please resolve back the ticket if I'm incorrect.
Perhaps this needs fixing: https://github.com/appcelerator/titanium_mobile/blob/cedf4838ac5dc7c9d7fcdb77b07ddb8a1f432271/build/packager.js#L104
PR for the fix: https://github.com/appcelerator/titanium_mobile/pull/8190 [~cwilliams] for your review. :)
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.