[
https://issues.apache.org/jira/browse/CB-6118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14020432#comment-14020432
]
Craig Payne commented on CB-6118:
---------------------------------
I have a related issue. My hybrid app is served assets via a Rails-based
website. Ideally, I'd be able to serve up one set of assets - not a patchwork
quilt - and then have the Cordova side of things work out what parts to use. I
ran into this with a workaround Andrew had supplied to cordova.js (see
CB-6505). When I went to add Android support to the existing iOS-only
implementation, I ran into this complication. cordova.js is different for the
different device architectures. cordova_plugins.js *might* be different for
the different device architectures (in the case where different plugins were in
use for each), and I believe the underlying JavaScript for the plugins also
might be different for the different device architectures. At present, I'm
including all of that in the Assets being served up by Rails when a page is
loaded. If there's a smarter way to do that (e.g., including the relevant
assets in the Cordova device-specific builds) that would be fine - but I
haven't yet started looking into that.
> CLI should support installing a plugin on a per-platform basis
> --------------------------------------------------------------
>
> Key: CB-6118
> URL: https://issues.apache.org/jira/browse/CB-6118
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CLI
> Reporter: Andrew Grieve
> Assignee: Mark Koudritsky
>
> There are several reasons why you would want to do this:
> * You want splashscreen on iOS, but not Android
> * You want a Play Services-based geolocation plugin on Android, and regular
> Geolocation for iOS
> * You want InAppBrowser for iOS, but want to just use intents on Android
> * You many want an older version of File plugin on Android, but the latest on
> on iOS
> Desired syntax:
> {code}
> cordova plugin add [email protected] --platform=ios
> cordova plugin rm org.apache.cordova.file --platform=ios --platform=android
> {code}
> Change to `cordova plugin ls`:
> {code}
> $ cordova plugin ls
> Plugins installed on Android:
> [email protected]
> [email protected]
> Plugins installed on iOS:
> [email protected]
> [email protected]
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)