{ "id": "63479", "key": "TIMOB-2847", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11240", "name": "Release 1.6.0 M07", "archived": true, "released": true, "releaseDate": "2011-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T02:00:14.000+0000", "created": "2011-04-15T03:31:04.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "feature", "ios", "module", "release-1.6.0", "rplist", "tooling" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T02:00:14.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}
Feature request by customer to allow for both Android and iOS\nmodules at the same time. The work around is easy enough\ncurrently.
\nHD Ticket for reference: http://developer.appcelerator.com/helpdesk/view/65931
\niOS LH ticket here: \nhttps://appcelerator.lighthouseapp.com/projects/32238-titanium-mobi...
\nCurrently there isn't a way for an app to specify what\nplatform(s) a module should be enabled for, and the version number\nis also a hard requirement. We should allow any of the following\nmethods for defining a module dependency in tiapp.xml:
\n\n\n<!-- the way it works today, use version 0.1 of com.company.module for all platforms-->\n<module version=\"0.1\">com.company.module</module>\n\n<!-- use version 0.1 of com.company.module only for Android -->\n<module version=\"0.1\" platform=\"android\">com.company.module</module>\n\n<!-- use the most recently installed version of com.company.module for all platforms -->\n<module>com.company.module</module>
\n
\nWe should also allow users to combine the rules above in\nmultiple <module>
tags, i.e:
\n\n<!-- use com.company.module 1.0 for android, 1.1 for iphone -->\n<module platform=\"android\" version=\"1.0\">com.company.module</module>\n<module platform=\"iphone\" version=\"1.1\">com.company.module</module>
\n
Rick, please add the workaround to this ticket.
Same ticket as: \nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/2950-...
\n?
Move additional info from #2950. We usually merge to the earliest\nticket. Changed to be tooling an not Android specific.
(from [1c687fca8587ae3591f437e717a4968ccdc14fdd])\nadded support for \"platform\" attribute in the tiapp.xml tag to\nModuleDetector. changed the iphone builder/compiler scripts to use\nthe more generic detection/extraction logic on module.py [#2847\nstate:fixed-in-qa] \nhttps://github.com/appcelerator/titanium_mobile/commit/1c687fca8587...
Tested on 2.2 device (not that that really matters in this\ncase), Titanium 1.6.0 6e8d578.
\nTest steps I did:
\nCreated an iOS module and gave it version 1.2.
\nCreated a test project and put the <module\nversion=\"1.2\">
line in tiapp.xml the \"old\" way, meaning\nwith no platform
attribute.
Launched the test project in Android. Got an\nerror -- during the build -- about not finding the module,\nas expected, so that's good.
\nAdded platform=\"iphone\"
to the module line in\ntiapp.xml.
Relaunched the test project in Android -- no build\nerrors this time, so that's good.
\nLaunched the test project in iPhone and it\nworked fine, finding the module and everything.
\nCreated an Android module (same id) and gave it version 1.1.
\nAdded <module platform=\"android\" version=\"1.1\">[my\nmodule id]</module>
to the\n<modules>
section in tiapp.xml, so now there was\none with platform=\"iphone\" version=\"1.2\"
and another\nwith platform=\"android\" version=\"1.1\"
.
Launched again in iPhone -- still worked.
\nLaunched again in Android -- worked fine.
\n