|
8 | 8 | #import "ALIronSourceMediationAdapter.h"
|
9 | 9 | #import <IronSource/IronSource.h>
|
10 | 10 |
|
11 |
| -#define ADAPTER_VERSION @"7.2.1.0.0" |
| 11 | +#define ADAPTER_VERSION @"7.2.1.0.1" |
12 | 12 |
|
13 | 13 | @interface ALIronSourceMediationAdapterRouter : ALMediationAdapterRouter<ISDemandOnlyInterstitialDelegate, ISDemandOnlyRewardedVideoDelegate, ISLogDelegate>
|
14 | 14 | @property (nonatomic, assign, getter=hasGrantedReward) BOOL grantedReward;
|
@@ -123,7 +123,17 @@ - (void)showInterstitialAdForParameters:(id<MAAdapterResponseParameters>)paramet
|
123 | 123 |
|
124 | 124 | if ( [IronSource hasISDemandOnlyInterstitial: instanceID] )
|
125 | 125 | {
|
126 |
| - [IronSource showISDemandOnlyInterstitial: [ALUtils topViewControllerFromKeyWindow] instanceId: instanceID]; |
| 126 | + UIViewController *presentingViewController; |
| 127 | + if ( ALSdk.versionCode >= 11020199 ) |
| 128 | + { |
| 129 | + presentingViewController = parameters.presentingViewController ?: [ALUtils topViewControllerFromKeyWindow]; |
| 130 | + } |
| 131 | + else |
| 132 | + { |
| 133 | + presentingViewController = [ALUtils topViewControllerFromKeyWindow]; |
| 134 | + } |
| 135 | + |
| 136 | + [IronSource showISDemandOnlyInterstitial: presentingViewController instanceId: instanceID]; |
127 | 137 | }
|
128 | 138 | else
|
129 | 139 | {
|
@@ -171,7 +181,17 @@ - (void)showRewardedAdForParameters:(id<MAAdapterResponseParameters>)parameters
|
171 | 181 | // Configure reward from server.
|
172 | 182 | [self configureRewardForParameters: parameters];
|
173 | 183 |
|
174 |
| - [IronSource showISDemandOnlyRewardedVideo: [ALUtils topViewControllerFromKeyWindow] instanceId: instanceID]; |
| 184 | + UIViewController *presentingViewController; |
| 185 | + if ( ALSdk.versionCode >= 11020199 ) |
| 186 | + { |
| 187 | + presentingViewController = parameters.presentingViewController ?: [ALUtils topViewControllerFromKeyWindow]; |
| 188 | + } |
| 189 | + else |
| 190 | + { |
| 191 | + presentingViewController = [ALUtils topViewControllerFromKeyWindow]; |
| 192 | + } |
| 193 | + |
| 194 | + [IronSource showISDemandOnlyRewardedVideo: presentingViewController instanceId: instanceID]; |
175 | 195 | }
|
176 | 196 | else
|
177 | 197 | {
|
|
0 commit comments