Skip to content

Commit

Permalink
Fyber/8.1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
prod-applovin-deploy committed Mar 6, 2022
1 parent 7123fd5 commit 7765a6a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Fyber/AppLovinMediationFyberAdapter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ s.authors =
'AppLovin Corporation' => '[email protected]'
}
s.name = 'AppLovinMediationFyberAdapter'
s.version = '8.1.3.1'
s.version = '8.1.3.2'
s.platform = :ios, '9.0'
s.summary = 'Fyber adapter used for mediation with the AppLovin MAX SDK'
s.homepage = "https://github.com/CocoaPods/Specs/search?o=desc&q=#{s.name}&s=indexed"
Expand Down
3 changes: 3 additions & 0 deletions Fyber/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 8.1.3.2
* Add support for passing in a presenting view controller.

## 8.1.3.1
* Add support for IAB's CCPA Privacy String.

Expand Down
18 changes: 15 additions & 3 deletions Fyber/Fyber/ALInneractiveMediationAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "ALInneractiveMediationAdapter.h"
#import <IASDKCore/IASDKCore.h>

#define ADAPTER_VERSION @"8.1.3.1"
#define ADAPTER_VERSION @"8.1.3.2"

@interface ALInneractiveMediationAdapterGlobalDelegate : NSObject<IAGlobalAdDelegate>
@end
Expand Down Expand Up @@ -54,6 +54,8 @@ @interface ALInneractiveMediationAdapter()
@property (nonatomic, strong) IAVideoContentController *videoContentController;
@property (nonatomic, strong) IAMRAIDContentController *MRAIDContentController;

@property (nonatomic, weak) UIViewController *presentingViewController;

@end

@implementation ALInneractiveMediationAdapter
Expand Down Expand Up @@ -246,6 +248,11 @@ - (void)showInterstitialAdForParameters:(id<MAAdapterResponseParameters>)paramet

if ( self.interstitialAdSpot.activeUnitController == self.interstitialUnitController )
{
if ( ALSdk.versionCode >= 11020199 )
{
self.presentingViewController = parameters.presentingViewController;
}

ALInneractiveCurrentlyShowingAdapters[parameters.thirdPartyAdPlacementIdentifier] = self;
[self.interstitialUnitController showAdAnimated: YES completion: nil];
}
Expand Down Expand Up @@ -325,6 +332,11 @@ - (void)showRewardedAdForParameters:(id<MAAdapterResponseParameters>)parameters
// Configure reward from server.
[self configureRewardForParameters: parameters];

if ( ALSdk.versionCode >= 11020199 )
{
self.presentingViewController = parameters.presentingViewController;
}

[self.rewardedUnitController showAdAnimated: YES completion: nil];
}
else
Expand Down Expand Up @@ -529,7 +541,7 @@ - (instancetype)initWithParentAdapter:(ALInneractiveMediationAdapter *)parentAda

- (UIViewController *)IAParentViewControllerForUnitController:(nullable IAUnitController *)unitController
{
return [ALUtils topViewControllerFromKeyWindow];
return self.parentAdapter.presentingViewController ?: [ALUtils topViewControllerFromKeyWindow];
}

- (void)IAAdDidReceiveClick:(nullable IAUnitController *)unitController
Expand Down Expand Up @@ -579,7 +591,7 @@ - (instancetype)initWithParentAdapter:(ALInneractiveMediationAdapter *)parentAda

- (UIViewController *)IAParentViewControllerForUnitController:(nullable IAUnitController *)unitController
{
return [ALUtils topViewControllerFromKeyWindow];
return self.parentAdapter.presentingViewController ?: [ALUtils topViewControllerFromKeyWindow];
}

- (void)IAAdDidReceiveClick:(nullable IAUnitController *)unitController
Expand Down

0 comments on commit 7765a6a

Please sign in to comment.