dpa99c / cordova-launch-review

Cordova/Phonegap plugin for iOS and Android to assist in leaving user reviews/ratings in the App Stores
71 stars 26 forks source link

Pass success/error result to rating() "dismissed" event #9

Closed JulianLaval closed 6 years ago

JulianLaval commented 6 years ago

Thanks for your diligent work on this plugin!

As it stands, the dismissed event triggered by the rating() method doesn't appear to differentiate between cancellations and successful ratings. I don't suppose it'd be feasible to pass an explicit result?

I haven't yet checked the appropriate HealthKit documentation, but assuming this is feasible I'd be happy to submit a PR.

dpa99c commented 6 years ago

The native method which is called by this plugin does not return any result or outcome so differentiating whether the user has cancelled the dialog or submitted a rating is not possible.

In fact, that native method doesn't even guarantee that the dialog will appear when the method is called, hence this plugin has to use indirect monitoring of the iOS view hierarchy to determine when the dialog is shown and dismissed.

JulianLaval commented 6 years ago

Fair enough, thanks for the prompt reply!