Skip to content

Commit

Permalink
InMobi - 9.1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
p158276 committed Jun 18, 2021
1 parent 34c22b3 commit aea5b5a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
4 changes: 4 additions & 0 deletions InMobi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Changelog
* 9.1.7.3
* Fix bidding logic not being called when bidding ad response is returned.
* Publishers must use this adapter version at the minimum for Advanced Bidding.

* 9.1.7.2
* Replace `InMobiSDK` with `ImMobiSDK/Core` to exclude the Moat SDK in order to avoid UIWebView deprecation issues.

Expand Down
2 changes: 1 addition & 1 deletion InMobi/InMobiAdapterConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ @implementation InMobiAdapterConfiguration
#pragma mark - MPAdapterConfiguration

- (NSString *)adapterVersion {
return @"9.1.7.2";
return @"9.1.7.3";
}

- (NSString *)biddingToken {
Expand Down
5 changes: 2 additions & 3 deletions InMobi/InMobiBannerCustomEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
#endif


@interface InMobiBannerCustomEvent () <CLLocationManagerDelegate>
@interface InMobiBannerCustomEvent ()

@property (nonatomic, strong) IMBanner * bannerAd;
@property (nonatomic, copy) NSString * placementId;
@property (nonatomic, strong) CLLocationManager * locationManager;

@end

Expand Down Expand Up @@ -95,7 +94,7 @@ - (void)requestAdWithSize:(CGSize)size adapterInfo:(NSDictionary *)info adMarkup
dspName:nil], [self getAdNetworkId]);

IMCompletionBlock completionBlock = ^{
if (adMarkup != nil && adMarkup <= 0) {
if ([adMarkup isKindOfClass:[NSString class]] && adMarkup.length > 0) {
[self.bannerAd load:[adMarkup dataUsingEncoding:NSUTF8StringEncoding]];
} else {
[self.bannerAd load];
Expand Down
2 changes: 1 addition & 1 deletion InMobi/InMobiInterstitialCustomEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ - (void)requestAdWithAdapterInfo:(NSDictionary *)info adMarkup:(NSString *)adMar
dspName:nil], [self getAdNetworkId]);

IMCompletionBlock completionBlock = ^{
if (adMarkup != nil && adMarkup <= 0) {
if ([adMarkup isKindOfClass:[NSString class]] && adMarkup.length > 0) {
[self.interstitialAd load:[adMarkup dataUsingEncoding:NSUTF8StringEncoding]];
} else {
[self.interstitialAd load];
Expand Down
11 changes: 5 additions & 6 deletions InMobi/InMobiRewardedVideoCustomEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ - (void)requestAdWithAdapterInfo:(NSDictionary *)info adMarkup:(NSString *)adMar
dspName:nil], [self getAdNetworkId]);

IMCompletionBlock completionBlock = ^{
if (adMarkup != nil && adMarkup <= 0) {
if ([adMarkup isKindOfClass:[NSString class]] && adMarkup.length > 0) {
[self.rewardedVideoAd load:[adMarkup dataUsingEncoding:NSUTF8StringEncoding]];
} else {
[self.rewardedVideoAd load];
Expand Down Expand Up @@ -195,13 +195,12 @@ -(void)userWillLeaveApplicationFromInterstitial:(IMInterstitial*)interstitial {
}

-(void)interstitial:(IMInterstitial*)interstitial rewardActionCompletedWithRewards:(NSDictionary*)rewards {
MPReward *reward = [MPReward unspecifiedReward];
if (rewards != nil && [rewards count] > 0) {
MPReward *reward = [[MPReward alloc] initWithCurrencyType:kMPRewardCurrencyTypeUnspecified amount:[rewards allValues][0]];
MPLogInfo(@"InMobi reward action completed with rewards: %@", [rewards description]);
[self.delegate fullscreenAdAdapter:self willRewardUser:reward];
} else {
MPLogInfo(@"InMobi reward action failed, rewards object is empty");
reward = [[MPReward alloc] initWithCurrencyType:kMPRewardCurrencyTypeUnspecified amount:[rewards allValues][0]];
}
MPLogInfo(@"InMobi reward action completed with rewards: %@", [rewards description]);
[self.delegate fullscreenAdAdapter:self willRewardUser:reward];
}

@end

0 comments on commit aea5b5a

Please sign in to comment.