Skip to content

Commit

Permalink
InMobi/10.7.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AppLovin-Mobile-Engineering committed Oct 8, 2024
1 parent fc87934 commit 1f7c6fc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 25 deletions.
4 changes: 2 additions & 2 deletions InMobi/AppLovinMediationInMobiAdapter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|

s.authors = 'AppLovin Corporation'
s.name = 'AppLovinMediationInMobiAdapter'
s.version = '10.7.5.1'
s.version = '10.7.8.0'
s.platform = :ios, '12.0'
s.summary = 'InMobi 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 All @@ -26,7 +26,7 @@ s.source =

s.vendored_frameworks = "#{s.name}-#{s.version}/#{s.name}.xcframework"

s.dependency 'InMobiSDK', '= 10.7.5'
s.dependency 'InMobiSDK', '= 10.7.8'
s.dependency 'AppLovinSDK', '>= 13.0.0'
s.swift_version = '5.0'

Expand Down
4 changes: 4 additions & 0 deletions InMobi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 10.7.8.0
* Certified with InMobi SDK 10.7.8.
* Simplified API calls by removing selector checks; direct API calls are now safe with the updated min SDK version.

## 10.7.5.1
* Requires minimum AppLovin MAX SDK version be 13.0.0.
* Removed COPPA support.
Expand Down
31 changes: 8 additions & 23 deletions InMobi/InMobiAdapter/ALInMobiMediationAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "ALInMobiMediationAdapter.h"
#import <InMobiSDK/InMobiSDK.h>

#define ADAPTER_VERSION @"10.7.5.1"
#define ADAPTER_VERSION @"10.7.8.0"

/**
* Dedicated delegate object for InMobi AdView ads.
Expand Down Expand Up @@ -589,12 +589,9 @@ - (void)bannerDidFinishLoading:(IMBanner *)banner
{
[self.parentAdapter log: @"AdView loaded"];

// Passing extra info such as creative id supported in 6.15.0+
if ( ALSdk.versionCode >= 6150000 && [banner.creativeId al_isValidString] )
if ( [banner.creativeId al_isValidString] )
{
[self.delegate performSelector: @selector(didLoadAdForAdView:withExtraInfo:)
withObject: banner
withObject: @{@"creative_id" : banner.creativeId}];
[self.delegate didLoadAdForAdView: banner withExtraInfo: @{@"creative_id" : banner.creativeId}];
}
else
{
Expand Down Expand Up @@ -663,11 +660,9 @@ - (void)interstitialDidFinishLoading:(IMInterstitial *)interstitial
{
[self.parentAdapter log: @"Interstitial loaded"];

// Passing extra info such as creative id supported in 6.15.0+
if ( ALSdk.versionCode >= 6150000 && [interstitial.creativeId al_isValidString] )
if ( [interstitial.creativeId al_isValidString] )
{
[self.delegate performSelector: @selector(didLoadInterstitialAdWithExtraInfo:)
withObject: @{@"creative_id" : interstitial.creativeId}];
[self.delegate didLoadInterstitialAdWithExtraInfo: @{@"creative_id" : interstitial.creativeId}];
}
else
{
Expand Down Expand Up @@ -755,10 +750,9 @@ - (void)interstitialDidFinishLoading:(IMInterstitial *)interstitial
[self.parentAdapter log: @"Rewarded ad loaded"];

// Passing extra info such as creative id supported in 6.15.0+
if ( ALSdk.versionCode >= 6150000 && [interstitial.creativeId al_isValidString] )
if ( [interstitial.creativeId al_isValidString] )
{
[self.delegate performSelector: @selector(didLoadRewardedAdWithExtraInfo:)
withObject: @{@"creative_id" : interstitial.creativeId}];
[self.delegate didLoadRewardedAdWithExtraInfo: @{@"creative_id" : interstitial.creativeId}];
}
else
{
Expand Down Expand Up @@ -1040,16 +1034,7 @@ - (void)nativeDidFinishLoading:(IMNative *)nativeAd
builder.callToAction = nativeAd.adCtaText;
builder.icon = [[MANativeAdImage alloc] initWithImage: nativeAd.adIcon];
builder.mediaView = [[UIView alloc] init];

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
// Introduced in 11.7.0
if ( [builder respondsToSelector: @selector(setStarRating:)] )
{
// NOTE: `nativeAd.adRating` is an NSString(ex: @"1.0"). Using .doubleValue any invalid value, 0 -> 0.0
[builder performSelector: @selector(setStarRating:) withObject: @(nativeAd.adRating.doubleValue)];
}
#pragma clang diagnostic pop
builder.starRating = @(nativeAd.adRating.doubleValue);
}];

NSDictionary *extraInfo = [nativeAd.creativeId al_isValidString] ? @{@"creative_id" : nativeAd.creativeId} : nil;
Expand Down

0 comments on commit 1f7c6fc

Please sign in to comment.