[TIMOB-2847] Android: Support for multi platform side-by-side modules
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T02:00:14.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M07 |
Components | Android |
Labels | android, feature, ios, module, release-1.6.0, rplist, tooling |
Reporter | Rick Blalock |
Assignee | Don Thorp |
Created | 2011-04-15T03:31:04.000+0000 |
Updated | 2011-04-17T02:00:14.000+0000 |
Description
Feature request by customer to allow for both Android and iOS modules at the same time. The work around is easy enough currently.
HD Ticket for reference: http://developer.appcelerator.com/helpdesk/view/65931">http://developer.appcelerator.com/helpdesk/view/65931
iOS LH ticket here: https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/2848-ios-support-for-side-by-side-modules"> https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi...
Currently there isn't a way for an app to specify what platform(s) a module should be enabled for, and the version number is also a hard requirement. We should allow any of the following methods for defining a module dependency in tiapp.xml:
<!-- the way it works today, use version 0.1 of com.company.module for all platforms-->
<module version="0.1">com.company.module</module>
<!-- use version 0.1 of com.company.module only for Android -->
<module version="0.1" platform="android">com.company.module</module>
<!-- use the most recently installed version of com.company.module for all platforms -->
<module>com.company.module</module>
We should also allow users to combine the rules above in
multiple <module>
tags, i.e:
<!-- use com.company.module 1.0 for android, 1.1 for iphone -->
<module platform="android" version="1.0">com.company.module</module>
<module platform="iphone" version="1.1">com.company.module</module>
Rick, please add the workaround to this ticket.
Same ticket as: https://appcelerator.lighthouseapp.com/projects/32238/tickets/2950-tooling-add-support-for-platform-and-default-version-for-modules-in-tiappxml"> https://appcelerator.lighthouseapp.com/projects/32238/tickets/2950-...
?
Move additional info from #2950. We usually merge to the earliest ticket. Changed to be tooling an not Android specific.
(from [1c687fca8587ae3591f437e717a4968ccdc14fdd]) added support for "platform" attribute in the tiapp.xml tag to ModuleDetector. changed the iphone builder/compiler scripts to use the more generic detection/extraction logic on module.py [#2847 state:fixed-in-qa] https://github.com/appcelerator/titanium_mobile/commit/1c687fca8587ae3591f437e717a4968ccdc14fdd"> https://github.com/appcelerator/titanium_mobile/commit/1c687fca8587...
Tested on 2.2 device (not that that really matters in this case), Titanium 1.6.0 6e8d578.
Test steps I did:
Created an iOS module and gave it version 1.2.
Created a test project and put the
<module version="1.2">
line in tiapp.xml the "old" way, meaning with noplatform
attribute.Launched the test project in Android. Got an error -- during the build -- about not finding the module, as expected, so that's good.
Added
platform="iphone"
to the module line in tiapp.xml.Relaunched the test project in Android -- no build errors this time, so that's good.
Launched the test project in iPhone and it worked fine, finding the module and everything.
Created an Android module (same id) and gave it version 1.1.
Added
<module platform="android" version="1.1">[my module id]</module>
to the<modules>
section in tiapp.xml, so now there was one withplatform="iphone" version="1.2"
and another withplatform="android" version="1.1"
.Launched again in iPhone -- still worked.
Launched again in Android -- worked fine.