Updated property name and warniung message based on feedback
MODIFY
adapters/Vungle/VungleAdapter/GADMAdapterVungleInterstitial.m
adapters/Vungle/VungleAdapter/GADMAdapterVungleInterstitial.m
@@ -36,7 +36,7 @@ static NSString *const kGADMAdapterVungleInterstitialKeyApplicationID = @"applic
NSError *error = [NSError errorWithDomain:@"google"
code:0
userInfo:@{
- NSLocalizedDescriptionKey : @"No ad fetched."
+ NSLocalizedDescriptionKey : @"Vungle doesn't support banner ads."
}];
[_connector adapter:self didFailAd:error];
}
@@ -52,8 +52,8 @@ static NSString *const kGADMAdapterVungleInterstitialKeyApplicationID = @"applic
- (void)getInterstitial {
VungleAdNetworkExtras* extras = [_connector networkExtras];
- desiredPlacement = extras.placement;
- if (!extras || !extras.placements || [extras.placements count] == 0) {
+ desiredPlacement = extras.playingPlacement;
+ if (!extras || !extras.allPlacements || [extras.allPlacements count] == 0) {
NSLog(@"Placements should be specified!");
[_connector adapter:self didFailAd:[NSError errorWithDomain:@"GADMAdapterVungleInterstitial" code:0 userInfo:@{NSLocalizedDescriptionKey: @"Placements should be specified!"}]];
return;
@@ -64,7 +64,7 @@ static NSString *const kGADMAdapterVungleInterstitialKeyApplicationID = @"applic
} else {
NSDictionary *serverParameters = [_connector credentials];
NSString *applicationID = [serverParameters objectForKey:kGADMAdapterVungleInterstitialKeyApplicationID];
- [[vungleHelper sharedInstance] initWithAppId:applicationID placements:extras.placements adapter:InterstitialAdapter];
+ [[vungleHelper sharedInstance] initWithAppId:applicationID placements:extras.allPlacements adapter:InterstitialAdapter];
}
}

MODIFY
adapters/Vungle/VungleAdapter/GADMAdapterVungleRewardBasedVideoAd.m
adapters/Vungle/VungleAdapter/GADMAdapterVungleRewardBasedVideoAd.m
@@ -36,7 +36,7 @@ static NSString *const kGADMAdapterVungleRewardBasedVideoAdKeyApplicationID = @"
NSDictionary *serverParameters = [_connector credentials];
NSString *applicationID = [serverParameters objectForKey:kGADMAdapterVungleRewardBasedVideoAdKeyApplicationID];
VungleAdNetworkExtras* extras = [_connector networkExtras];
- if (!extras || !extras.placements || [extras.placements count] == 0) {
+ if (!extras || !extras.allPlacements || [extras.allPlacements count] == 0) {
NSLog(@"Placements should be specified!");
[_connector adapter:self didFailToSetUpRewardBasedVideoAdWithError:[NSError errorWithDomain:@"GADMAdapterVungleRewardBasedVideoAd" code:0 userInfo:@{NSLocalizedDescriptionKey: @"Placements should be specified!"}]];
return;
@@ -45,13 +45,13 @@ static NSString *const kGADMAdapterVungleRewardBasedVideoAdKeyApplicationID = @"
if ([sdk isInitialised]) {
[_connector adapterDidSetUpRewardBasedVideoAd:self];
} else {
- [sdk initWithAppId:applicationID placements:extras.placements adapter:RewardBasedAdapter];
+ [sdk initWithAppId:applicationID placements:extras.allPlacements adapter:RewardBasedAdapter];
}
}
- (void)requestRewardBasedVideoAd {
vungleHelper* sdk = [vungleHelper sharedInstance];
- desiredPlacement = ((VungleAdNetworkExtras *)[_connector networkExtras]).placement;
+ desiredPlacement = ((VungleAdNetworkExtras *)[_connector networkExtras]).playingPlacement;
if ([sdk isAdPlayableFor:desiredPlacement]) {
[_connector adapterDidReceiveRewardBasedVideoAd:self];
} else {

MODIFY
adapters/Vungle/VungleAdapter/VungleAdNetworkExtras.h
adapters/Vungle/VungleAdapter/VungleAdNetworkExtras.h
@property (nonatomic, assign) BOOL muted;
-@property (nonatomic, copy) NSArray<NSString *> * _Nonnull placements;
+@property (nonatomic, copy) NSArray<NSString *> * _Nonnull allPlacements;
-@property (nonatomic, copy) NSString * _Nonnull placement;
+@property (nonatomic, copy) NSString * _Nonnull playingPlacement;
@end

Updated property name and warniung message based on feedback