Best Cordova Plugin Workflows?


#1

Hi!

So I am making an application that utilizes some Cordova native plugins, and was wondering what the best workflow is. I am currently writing / editing my code and the running ionic cordova run ios. This process usually takes some time and I was wondering if anyone had a better / faster alternative. I would usually just use ionic serve command but my application does not work correctly because it does not have access to the cordova plugsin.

Thanks!


#2

Which is why I wrote Ionic Native Mocks :slight_smile:

See https://chrisgriffith.wordpress.com/2017/07/05/announcing-ionic-native-mocks/ for the intro. To customize them, see this post: https://chrisgriffith.wordpress.com/2017/08/21/customizing-ionic-native-mocks/


#3

Considered using Ionic DevApp?


#4

And it’s fantastic! I wrote one for InAppPurchase2 by the way, which I don’t think is in your set yet. It’s here. Please feel free to add it if you’d like, or I could submit a PR. Or if you think it has problems, please let me know. First one I’ve done.


#5

How does SQLite function with Native Mocks?


#6

Awesome, please submit a PR. I need to cross check the collection against recent updates and can merge it in then.


#7

The mock will just respond the call is made correctly. By default, no real data is returned from the calls. You can customize the mock to provide what would be sample data for your application. Does that help?


#8

I’ve never wrapped something for npm before. Is it easy? Or is there a doc/tutorial I should look at? Thanks.