PeterStaev / nativescript-purchase

:moneybag: A NativeScript plugin for making in-app purchases!
Apache License 2.0
82 stars 28 forks source link

made init() return a Promise #21

Closed svzi closed 7 years ago

svzi commented 7 years ago

I've experienced some issues while using this plugin so far. With the current implementation I called purchase.init([...]); in my app.ts (using plain TypeScript, without Angular). In my first view-model I called purchase.getProducts() but the corresponding helper in the android implementation wasn't initialized and the call crashed.

The way I modified it, I can easily chain the calls in my view-model and I make sure that the plugin has been initialized correctly and is working. 👍

svzi commented 7 years ago

Thanks for approving @PeterStaev !

Any idea when you will publish a new version?

PeterStaev commented 7 years ago

Hey @svzi , thanks for your contribution! The new version is published now on NPM.

svzi commented 7 years ago

I need to thank you, @PeterStaev, for the great plugin. 👍