Skip to content

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

@TobyReeno

Description

@TobyReeno

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions