m0dch3n / vue-cli-plugin-cordova

Vue Cli 3 Cordova Plugin
MIT License
417 stars 63 forks source link

Cannot pass options to `cordova run ios` #50

Closed baldoalessandro closed 5 years ago

baldoalessandro commented 5 years ago

Hello thank you for the project!

While developing an app targeting iOS I've incurrend in a limitation of this package.

Since npm run cordova-serve-ios doesn't provide args to the underling cordova run ios it's not possible to run the app in a specific iOS emulator. This could be easily achieved with (for example):

cordova run ios --target="iPhone-7, 12.0"

This limitation is similar to the one reported here #26 but in this case I can't work-around the issue by using the build.json file (because this file is not read by the cordova run ios script).

Would be OK to inject here the args to cordova run ios ? https://github.com/m0dch3n/vue-cli-plugin-cordova/blob/2e92f331e8dcfff389faf91b60252e22c2f86bdf/index.js#L34-L46

Thank you

m0dch3n commented 5 years ago

the problem of injecting params to the cordova command basically is that we loose the vue serve params, as the plugin is executing vue serve and cordova run...

An idea I had, was that we add prompt for the cordova params, with maybe a fla --interactive

m0dch3n commented 5 years ago

I'll close this ticket in favor of #26 because it's basically the same discussion... IMO the interactive prompt is the best solution, to clearly show a user which params are passed to vue serve/build, and which params are passed to cordova run/build