Skip to content

Commit

Permalink
Native ad expiry for MSAN
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 26788daacef5c2a69bcd44182f5b0dddcf1ec960
Author: abhisheksharma <[email protected]>
Date:   Fri Mar 26 00:50:48 2021 +0530

    Added Native ad expiry for MSAN

commit bad07c9d68747f0adb689bbcea16608951b47d3a
Author: abhisheksharma <[email protected]>
Date:   Fri Mar 26 00:45:48 2021 +0530

    Updated Ad ExpiryTime
  • Loading branch information
asharmaa committed Mar 25, 2021
1 parent 4413a40 commit 35e90c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdk/sourcefiles/native/internal/ANNativeAdResponse.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
NSInteger const kANNativeFacebookAdAboutToExpire = 3600;
NSInteger const kANNativeRTBAdAboutToExpire = 21600;
NSInteger const kANNativeRTBAdAboutToExpireForMember_11217 = 300;
NSInteger const kANNativeRTBAdAboutToExpireForMember_12085 = 600;


#pragma mark - ANNativeAdResponseGestureRecognizerRecord
Expand Down Expand Up @@ -333,6 +334,8 @@ -(void)registerAdAboutToExpire{
timeInterval = kANNativeFacebookAdAboutToExpire - self.aboutToExpireInterval;
}else if ([self.adResponseInfo.contentSource isEqualToString:@"rtb"] && self.adResponseInfo.memberId == 11217 ){
timeInterval = kANNativeRTBAdAboutToExpireForMember_11217 - self.aboutToExpireInterval;
}else if ([self.adResponseInfo.contentSource isEqualToString:@"rtb"] && self.adResponseInfo.memberId == 12085 ){
timeInterval = kANNativeRTBAdAboutToExpireForMember_12085 - self.aboutToExpireInterval;
}else{
timeInterval = kANNativeRTBAdAboutToExpire - self.aboutToExpireInterval;
}
Expand Down Expand Up @@ -392,6 +395,9 @@ - (void)setAboutToExpireTimeInterval
}else if ([self.adResponseInfo.contentSource isEqualToString:@"rtb"] && self.adResponseInfo.memberId == 11217 && aboutToExpireTimeInterval >= kANNativeRTBAdAboutToExpireForMember_11217 ){
ANLogError(@"nativeAdAboutToExpireInterval can not be set greater than or equal to 5 minutes for RTB & member 11217");
return;
}else if ([self.adResponseInfo.contentSource isEqualToString:@"rtb"] && self.adResponseInfo.memberId == 12085 && aboutToExpireTimeInterval >= kANNativeRTBAdAboutToExpireForMember_12085 ){
ANLogError(@"nativeAdAboutToExpireInterval can not be set greater than or equal to 10 minutes for RTB & member 12085");
return;
}else if(aboutToExpireTimeInterval >= kANNativeRTBAdAboutToExpire){
ANLogError(@"nativeAdAboutToExpireInterval can not be set greater than or equal to 6 hours");
return;
Expand Down

0 comments on commit 35e90c9

Please sign in to comment.