diff --git a/Fyber/AppLovinMediationFyberAdapter.podspec b/Fyber/AppLovinMediationFyberAdapter.podspec index 474567cf15..7c41960559 100644 --- a/Fyber/AppLovinMediationFyberAdapter.podspec +++ b/Fyber/AppLovinMediationFyberAdapter.podspec @@ -5,7 +5,7 @@ s.authors = 'AppLovin Corporation' => 'devsupport@applovin.com' } 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" diff --git a/Fyber/CHANGELOG.md b/Fyber/CHANGELOG.md index 43068efdf2..cc949f2f8b 100644 --- a/Fyber/CHANGELOG.md +++ b/Fyber/CHANGELOG.md @@ -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. diff --git a/Fyber/Fyber/ALInneractiveMediationAdapter.m b/Fyber/Fyber/ALInneractiveMediationAdapter.m index 77d01f7a7c..72ae959445 100644 --- a/Fyber/Fyber/ALInneractiveMediationAdapter.m +++ b/Fyber/Fyber/ALInneractiveMediationAdapter.m @@ -9,7 +9,7 @@ #import "ALInneractiveMediationAdapter.h" #import -#define ADAPTER_VERSION @"8.1.3.1" +#define ADAPTER_VERSION @"8.1.3.2" @interface ALInneractiveMediationAdapterGlobalDelegate : NSObject @end @@ -54,6 +54,8 @@ @interface ALInneractiveMediationAdapter() @property (nonatomic, strong) IAVideoContentController *videoContentController; @property (nonatomic, strong) IAMRAIDContentController *MRAIDContentController; +@property (nonatomic, weak) UIViewController *presentingViewController; + @end @implementation ALInneractiveMediationAdapter @@ -246,6 +248,11 @@ - (void)showInterstitialAdForParameters:(id)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]; } @@ -325,6 +332,11 @@ - (void)showRewardedAdForParameters:(id)parameters // Configure reward from server. [self configureRewardForParameters: parameters]; + if ( ALSdk.versionCode >= 11020199 ) + { + self.presentingViewController = parameters.presentingViewController; + } + [self.rewardedUnitController showAdAnimated: YES completion: nil]; } else @@ -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 @@ -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