From b86b47bc6b04579ebc86ec1160888b0cc6195ebb Mon Sep 17 00:00:00 2001 From: Charlie Bodman Date: Fri, 20 Oct 2017 16:01:27 -0700 Subject: [PATCH] fixed offerwall ios --- src/ios/IronSourceAdsPlugin.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ios/IronSourceAdsPlugin.m b/src/ios/IronSourceAdsPlugin.m index cb254fe..b3469e0 100644 --- a/src/ios/IronSourceAdsPlugin.m +++ b/src/ios/IronSourceAdsPlugin.m @@ -333,7 +333,14 @@ - (void)didFailToReceiveOfferwallCreditsWithError:(NSError *)error - (BOOL)didReceiveOfferwallCredits:(NSDictionary *)creditInfo { NSLog(@"%s", __PRETTY_FUNCTION__); - [self emitWindowEvent:EVENT_OFFERWALL_CREDITED withData:creditInfo]; + + NSDictionary *data = @{ + @"credits":@(creditInfo.credits), + @"totalCredits":@(creditInfo.totalCredits), + @"totalCreditsFlag":@(creditInfo.totalCreditsFlag) + }; + + [self emitWindowEvent:EVENT_OFFERWALL_CREDITED withData:data]; return YES; } @@ -430,7 +437,7 @@ - (void)interstitialDidFailToLoadWithError:(NSError *)error } }; - [self emitWindowEvent:EVENT_INTERSTITIAL_FAILED_TO_LOAD, data]; + [self emitWindowEvent:EVENT_INTERSTITIAL_FAILED_TO_LOAD withData:data]; } - (void)interstitialDidFailToShowWithError:(NSError *)error