Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewarded Video triggers "success" even if canceled on iOS #14

Open
TobyReeno opened this issue Sep 23, 2017 · 0 comments
Open

Rewarded Video triggers "success" even if canceled on iOS #14

TobyReeno opened this issue Sep 23, 2017 · 0 comments

Comments

@TobyReeno
Copy link

This is the sample code from cocoon_ads.js

        /**
         * Triggered when an video reward is completed.
         * @memberOf Cocoon.Ad.Interstitial
         * @event On reward
         * @example
         * interstitial.on("reward", function(reward, error){
         *   if (reward && reward.amount > 0) {
         *     console.log("Reward completed. Earned " + reward.amount + " items");
         *   }
         * });
         */

On Android the error parameter is empty when the video has been fully watched, or it's a string when user canceled the video. This way we can check in code whether we should reward the user or not. And that is awesome.

The problem is that the same code on iOS works differently. The error parameter is empty no matter if the video was canceled or not. This means it's not possible to check whether we should reward a user or not.

Could you please take a look at the iOS code? It looks like some small issue... a typo possibly?

BTW: The reward parameter (tested on Android) is not an object and does not have the .amount member. It's simply a string so it is no use here.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant