Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Set MoPub's consent into the Criteo Publisher SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainLofaso committed Feb 7, 2020
1 parent 334a9e4 commit 1834722
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Version 3.4.1.0

**Targeted version of the Criteo Publisher SDK**: 3.4.1

- **Features**
- Update the Criteo Publisher SDK with the Mopub's consent


2 changes: 2 additions & 0 deletions CRBannerCustomEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#import "CRBannerCustomEvent.h"
#import "CRCustomEventHelper.h"
#import "NSString+MPConsentStatus.h"

// Private properties
@interface CRBannerCustomEvent()
Expand Down Expand Up @@ -47,6 +48,7 @@ - (void) requestAdWithSize:(CGSize)size customEventInfo:(NSDictionary *)info adM
}
return;
}
[Criteo.sharedCriteo setMopubConsent:[NSString stringFromConsentStatus:MoPub.sharedInstance.currentConsentStatus]];
CRBannerAdUnit *bannerAdUnit = [[CRBannerAdUnit alloc] initWithAdUnitId:info[@"adUnitId"] size:size];
[[Criteo sharedCriteo] registerCriteoPublisherId:info[@"cpId"] withAdUnits:@[bannerAdUnit]];
// MoPub SDK instantiates a new CustomEvent object on every ad call so the bannerView will not be reused.
Expand Down
4 changes: 2 additions & 2 deletions CRCriteoAdapterConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@implementation CRCriteoAdapterConfiguration

- (NSString *)adapterVersion{
return [NSString stringWithFormat:@"%@.%@", [self networkSdkVersion], @"1"];
return @"3.4.1.0";
}

- (NSString *)biddingToken {
Expand All @@ -33,7 +33,7 @@ - (NSString *)moPubNetworkName{
}

- (NSString *)networkSdkVersion{
return @"3.1.0";
return @"3.4.1.0";
}

- (void)initializeNetworkWithConfiguration:(NSDictionary<NSString *, id> *)configuration complete:(void(^)(NSError *))complete {
Expand Down
2 changes: 2 additions & 0 deletions CRInterstitialCustomEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#import <Foundation/Foundation.h>
#import "CRInterstitialCustomEvent.h"
#import "CRCustomEventHelper.h"
#import "NSString+MPConsentStatus.h"

// Private property
@interface CRInterstitialCustomEvent ()
Expand Down Expand Up @@ -54,6 +55,7 @@ - (void) requestInterstitialWithCustomEventInfo:(NSDictionary *)info adMarkup:(N
return;
}

[Criteo.sharedCriteo setMopubConsent:[NSString stringFromConsentStatus:MoPub.sharedInstance.currentConsentStatus]];
CRInterstitialAdUnit *interstitialAdUnit = [[CRInterstitialAdUnit alloc] initWithAdUnitId:info[@"adUnitId"]];

[[Criteo sharedCriteo] registerCriteoPublisherId:info[@"cpId"] withAdUnits:@[interstitialAdUnit]];
Expand Down

0 comments on commit 1834722

Please sign in to comment.