From 60961ddc75162ce8147e7bbcbd2672a306950163 Mon Sep 17 00:00:00 2001 From: Vitalii Pavlenko Date: Wed, 17 Jul 2024 12:16:05 +0200 Subject: [PATCH] release 7.0.0-rc1 --- .../CriteoGoogleAdapter/CRBannerCustomEvent.m | 2 +- .../CRGoogleMediationParameters.h | 2 +- .../CRGoogleMediationParameters.m | 7 ++++--- .../CRInterstitialCustomEvent.m | 2 +- .../CRBannerCustomEventTests.m | 4 ++-- .../CRInterstitialCustomEventTests.m | 4 ++-- .../Sources/Configuration/CR_Config.h | 6 +++--- .../Sources/Configuration/CR_Config.m | 14 +++++++------- .../Sources/Configuration/CR_RemoteConfigRequest.m | 8 ++++---- CriteoPublisherSdk/Sources/Criteo.m | 6 +++--- CriteoPublisherSdk/Sources/Public/Criteo.h | 2 +- .../IntegrationTests/CR_LoggingFunctionalTests.m | 6 +++--- CriteoPublisherSdk/Tests/UnitTests/CriteoTests.m | 6 +++--- .../Categories/CR_DependencyProvider+Testing.m | 2 +- .../Tests/Utility/Categories/Criteo+Testing.m | 2 +- 15 files changed, 37 insertions(+), 36 deletions(-) diff --git a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m index 2861a5c3..5024a63c 100644 --- a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m +++ b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m @@ -44,7 +44,7 @@ - (void)loadBannerForAdUnit:(CRBannerAdUnit *)adUnit childDirectedTreatment:(NSNumber *)childDirectedTreatment { /// Set the publisher id to [Criteo.sharedCriteo registerCriteoPublisherId:params.publisherId - withInventoryGroupId:params.inventoryGroupId + withInventoryGroupId:params.inventoryGroupId withStoreId:params.storeId withAdUnits:@[ adUnit ]]; /// Set child directed treatment flag to Criteo SDK. diff --git a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.h b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.h index 3b9e8a6e..088aff25 100644 --- a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.h +++ b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.h @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)init NS_UNAVAILABLE; - (id)initWithPublisherId:(NSString *)publisherId - inventoryGroupId:(NSString *)inventoryGroupId + inventoryGroupId:(NSString *)inventoryGroupId storeId:(NSString *)storeId adUnitId:(NSString *)adUnitId; + (nullable CRGoogleMediationParameters *)parametersFromJSONString:(NSString *)jsonString diff --git a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.m b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.m index e866dd46..cfc24539 100644 --- a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.m +++ b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.m @@ -45,7 +45,7 @@ static void setJSONParsingError(NSError **error) { @implementation CRGoogleMediationParameters - (id)initWithPublisherId:(NSString *)publisherId - inventoryGroupId:(NSString *)inventoryGroupId + inventoryGroupId:(NSString *)inventoryGroupId storeId:(NSString *)storeId adUnitId:(NSString *)adUnitId { self = [super init]; @@ -78,7 +78,8 @@ + (nullable CRGoogleMediationParameters *)parametersFromJSONString:(NSString *)j NSString *pubId = nonEmptyStringFromObj(jsonDict[criteoGoogleMediationPublisherIdKey]); NSString *adId = nonEmptyStringFromObj(jsonDict[criteoGoogleMediationAdUnitIdKey]); NSString *storeId = nonEmptyStringFromObj(jsonDict[criteoGoogleMediationStoreIdKey]); - NSString *inventoryGroupId = nonEmptyStringFromObj(jsonDict[criteoGoogleMediationInventoryGroupIdKey]); + NSString *inventoryGroupId = + nonEmptyStringFromObj(jsonDict[criteoGoogleMediationInventoryGroupIdKey]); if (pubId == nil || adId == nil) { setJSONParsingError(error); return nil; @@ -87,7 +88,7 @@ + (nullable CRGoogleMediationParameters *)parametersFromJSONString:(NSString *)j *error = nil; } return [[CRGoogleMediationParameters alloc] initWithPublisherId:pubId - inventoryGroupId:inventoryGroupId + inventoryGroupId:inventoryGroupId storeId:storeId adUnitId:adId]; } diff --git a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m index 6369ec5e..f775d1c6 100644 --- a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m +++ b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m @@ -43,7 +43,7 @@ - (void)loadInterstitialForAdUnit:(CRInterstitialAdUnit *)adUnit adConfiguration:(CRGoogleMediationParameters *)params childDirectedTreatment:(NSNumber *)childDirectedTreatment { [Criteo.sharedCriteo registerCriteoPublisherId:params.publisherId - withInventoryGroupId:params.inventoryGroupId + withInventoryGroupId:params.inventoryGroupId withStoreId:params.storeId withAdUnits:@[ adUnit ]]; /// Set child directed treatment flag to Criteo SDK. diff --git a/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/CRBannerCustomEventTests.m b/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/CRBannerCustomEventTests.m index 25f0b90b..aee0bda9 100644 --- a/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/CRBannerCustomEventTests.m +++ b/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/CRBannerCustomEventTests.m @@ -71,7 +71,7 @@ - (void)testRequestBannerAdSuccess { id mockCriteo = OCMClassMock([Criteo class]); OCMStub([mockCriteo sharedCriteo]).andReturn(mockCriteo); OCMStub([mockCriteo registerCriteoPublisherId:@"testCpId" - withInventoryGroupId:@"testInventoryGroupId" + withInventoryGroupId:@"testInventoryGroupId" withStoreId:@"testStoreId" withAdUnits:@[ bannerAdUnit ]]); OCMStub([mockCriteo setChildDirectedTreatment:mockChildDirectedTreatment]); @@ -83,7 +83,7 @@ - (void)testRequestBannerAdSuccess { OCMVerify([mockCRBannerView loadAd]); OCMVerify([mockCRBannerView setDelegate:customEvent]); OCMVerify([mockCriteo registerCriteoPublisherId:@"testCpId" - withInventoryGroupId:@"testInventoryGroupId" + withInventoryGroupId:@"testInventoryGroupId" withStoreId:@"testStoreId" withAdUnits:@[ bannerAdUnit ]]); OCMVerify([mockCriteo setChildDirectedTreatment:mockChildDirectedTreatment]); diff --git a/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/CRInterstitialCustomEventTests.m b/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/CRInterstitialCustomEventTests.m index c3b54d84..e82018b3 100644 --- a/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/CRInterstitialCustomEventTests.m +++ b/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/CRInterstitialCustomEventTests.m @@ -78,7 +78,7 @@ - (void)testLoadAndPresentFromRootViewController { id mockCriteo = OCMStrictClassMock([Criteo class]); OCMStub([mockCriteo sharedCriteo]).andReturn(mockCriteo); OCMStub([mockCriteo registerCriteoPublisherId:@"testCpId" - withInventoryGroupId:@"testInventoryGroupId" + withInventoryGroupId:@"testInventoryGroupId" withStoreId:@"testStoreId" withAdUnits:@[ interstitialAdUnit ]]); OCMStub([mockCriteo setChildDirectedTreatment:mockChildDirectedTreatment]); @@ -92,7 +92,7 @@ - (void)testLoadAndPresentFromRootViewController { OCMVerify([mockCRInterstitial setDelegate:customEvent]); OCMVerify([mockCRInterstitial presentFromRootViewController:realVC]); OCMVerify([mockCriteo registerCriteoPublisherId:@"testCpId" - withInventoryGroupId:@"testInventoryGroupId" + withInventoryGroupId:@"testInventoryGroupId" withStoreId:@"testStoreId" withAdUnits:@[ interstitialAdUnit ]]); OCMVerify([mockCriteo setChildDirectedTreatment:mockChildDirectedTreatment]); diff --git a/CriteoPublisherSdk/Sources/Configuration/CR_Config.h b/CriteoPublisherSdk/Sources/Configuration/CR_Config.h index 4327d1a8..b5f88675 100644 --- a/CriteoPublisherSdk/Sources/Configuration/CR_Config.h +++ b/CriteoPublisherSdk/Sources/Configuration/CR_Config.h @@ -80,7 +80,7 @@ FOUNDATION_EXTERN NSString *const CR_ConfigConfigurationUrl; #pragma mark - Lifecycle - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId - inventoryGroupId:(nullable NSString *)inventoryGroupId + inventoryGroupId:(nullable NSString *)inventoryGroupId storeId:(nullable NSString *)storeId cdbUrl:(NSString *)cdbUrl appEventsUrl:(NSString *)appEventsUrl @@ -88,11 +88,11 @@ FOUNDATION_EXTERN NSString *const CR_ConfigConfigurationUrl; userDefaults:(NSUserDefaults *)userDefaults NS_DESIGNATED_INITIALIZER; - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId - inventoryGroupId:(nullable NSString *)inventoryGroupId + inventoryGroupId:(nullable NSString *)inventoryGroupId storeId:(nullable NSString *)storeId; - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId - inventoryGroupId:(nullable NSString *)inventoryGroupId; + inventoryGroupId:(nullable NSString *)inventoryGroupId; - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId; diff --git a/CriteoPublisherSdk/Sources/Configuration/CR_Config.m b/CriteoPublisherSdk/Sources/Configuration/CR_Config.m index 48f72a55..96d58a85 100644 --- a/CriteoPublisherSdk/Sources/Configuration/CR_Config.m +++ b/CriteoPublisherSdk/Sources/Configuration/CR_Config.m @@ -43,7 +43,7 @@ @interface CR_Config () @implementation CR_Config - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId - inventoryGroupId:(nullable NSString *)inventoryGroupId + inventoryGroupId:(nullable NSString *)inventoryGroupId storeId:(nullable NSString *)storeId cdbUrl:(NSString *)cdbUrl appEventsUrl:(NSString *)appEventsUrl @@ -85,7 +85,7 @@ - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId { return [self initWithCriteoPublisherId:criteoPublisherId - inventoryGroupId:nil + inventoryGroupId:nil storeId:nil cdbUrl:CR_ConfigCdbUrl appEventsUrl:CR_ConfigAppEventsUrl @@ -94,9 +94,9 @@ - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId } - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId - inventoryGroupId:(nullable NSString *)inventoryGroupId { + inventoryGroupId:(nullable NSString *)inventoryGroupId { return [self initWithCriteoPublisherId:criteoPublisherId - inventoryGroupId:inventoryGroupId + inventoryGroupId:inventoryGroupId storeId:nil cdbUrl:CR_ConfigCdbUrl appEventsUrl:CR_ConfigAppEventsUrl @@ -105,10 +105,10 @@ - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId } - (instancetype)initWithCriteoPublisherId:(nullable NSString *)criteoPublisherId - inventoryGroupId:(nullable NSString *)inventoryGroupId + inventoryGroupId:(nullable NSString *)inventoryGroupId storeId:(nullable NSString *)storeId { return [self initWithCriteoPublisherId:criteoPublisherId - inventoryGroupId:inventoryGroupId + inventoryGroupId:inventoryGroupId storeId:storeId cdbUrl:CR_ConfigCdbUrl appEventsUrl:CR_ConfigAppEventsUrl @@ -122,7 +122,7 @@ - (instancetype)init { - (instancetype)initWithUserDefaults:(NSUserDefaults *)userDefaults { return [self initWithCriteoPublisherId:nil - inventoryGroupId:nil + inventoryGroupId:nil storeId:nil cdbUrl:CR_ConfigCdbUrl appEventsUrl:CR_ConfigAppEventsUrl diff --git a/CriteoPublisherSdk/Sources/Configuration/CR_RemoteConfigRequest.m b/CriteoPublisherSdk/Sources/Configuration/CR_RemoteConfigRequest.m index 874d777c..06267492 100644 --- a/CriteoPublisherSdk/Sources/Configuration/CR_RemoteConfigRequest.m +++ b/CriteoPublisherSdk/Sources/Configuration/CR_RemoteConfigRequest.m @@ -31,7 +31,7 @@ @interface CR_RemoteConfigRequest () @property(copy, nonatomic) NSString *deviceOs; - (instancetype)initWithCriteoPublisherId:(NSString *)criteoPublisherId - inventoryGroupId:(NSString *)inventoryGroupId + inventoryGroupId:(NSString *)inventoryGroupId sdkVersion:(NSString *)sdkVersion appId:(NSString *)appId profileId:(NSNumber *)profileId @@ -45,7 +45,7 @@ @implementation CR_RemoteConfigRequest + (instancetype)requestWithConfig:(CR_Config *)config profileId:(NSNumber *)profileId { return [CR_RemoteConfigRequest.alloc initWithCriteoPublisherId:config.criteoPublisherId - inventoryGroupId:config.inventoryGroupId + inventoryGroupId:config.inventoryGroupId sdkVersion:config.sdkVersion appId:config.appId profileId:profileId @@ -55,7 +55,7 @@ + (instancetype)requestWithConfig:(CR_Config *)config profileId:(NSNumber *)prof } - (instancetype)initWithCriteoPublisherId:(NSString *)criteoPublisherId - inventoryGroupId:(NSString *)inventoryGroupId + inventoryGroupId:(NSString *)inventoryGroupId sdkVersion:(NSString *)sdkVersion appId:(NSString *)appId profileId:(NSNumber *)profileId @@ -78,7 +78,7 @@ - (instancetype)initWithCriteoPublisherId:(NSString *)criteoPublisherId - (NSDictionary *)postBody { return @{ @"cpId" : self.criteoPublisherId, - @"pubId": self.inventoryGroupId, + @"pubId" : self.inventoryGroupId, @"bundleId" : self.appId, @"sdkVersion" : self.sdkVersion, @"rtbProfileId" : self.profileId, diff --git a/CriteoPublisherSdk/Sources/Criteo.m b/CriteoPublisherSdk/Sources/Criteo.m index d9ffb0a9..bb9e1600 100644 --- a/CriteoPublisherSdk/Sources/Criteo.m +++ b/CriteoPublisherSdk/Sources/Criteo.m @@ -93,7 +93,7 @@ + (void)resetSharedCriteo { } - (void)registerCriteoPublisherId:(NSString *)criteoPublisherId - withInventoryGroupId:(NSString *)inventoryGroupId + withInventoryGroupId:(NSString *)inventoryGroupId withStoreId:(NSString *)storeId withAdUnits:(NSArray *)adUnits { if (criteoPublisherId == nil || criteoPublisherId.length == 0) { @@ -111,7 +111,7 @@ - (void)registerCriteoPublisherId:(NSString *)criteoPublisherId @try { [self.dependencyProvider.threadManager dispatchAsyncOnGlobalQueue:^{ [self _registerCriteoPublisherId:criteoPublisherId - withInventoryGroupId:inventoryGroupId + withInventoryGroupId:inventoryGroupId withStoreId:storeId withAdUnits:adUnits]; CRLogInfo(@"Registration", @@ -198,7 +198,7 @@ - (instancetype)initWithDependencyProvider:(CR_DependencyProvider *)dependencyPr } - (void)_registerCriteoPublisherId:(NSString *)criteoPublisherId - withInventoryGroupId:(NSString *)inventoryGroupId + withInventoryGroupId:(NSString *)inventoryGroupId withStoreId:(NSString *)storeId withAdUnits:(NSArray *)adUnits { self.config.criteoPublisherId = criteoPublisherId; diff --git a/CriteoPublisherSdk/Sources/Public/Criteo.h b/CriteoPublisherSdk/Sources/Public/Criteo.h index 3d3a1cc4..12a9e05a 100644 --- a/CriteoPublisherSdk/Sources/Public/Criteo.h +++ b/CriteoPublisherSdk/Sources/Public/Criteo.h @@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN * @param adUnits AdUnits array */ - (void)registerCriteoPublisherId:(NSString *)criteoPublisherId - withInventoryGroupId:(NSString *)inventoryGroupId + withInventoryGroupId:(NSString *)inventoryGroupId withStoreId:(NSString *)storeId withAdUnits:(NSArray *)adUnits; diff --git a/CriteoPublisherSdk/Tests/IntegrationTests/CR_LoggingFunctionalTests.m b/CriteoPublisherSdk/Tests/IntegrationTests/CR_LoggingFunctionalTests.m index 1f2de627..2c185c54 100644 --- a/CriteoPublisherSdk/Tests/IntegrationTests/CR_LoggingFunctionalTests.m +++ b/CriteoPublisherSdk/Tests/IntegrationTests/CR_LoggingFunctionalTests.m @@ -136,7 +136,7 @@ - (void)testVerboseLogsEnabled { - (void)testCriteoRegister_ShouldBeLogged { [self.criteo registerCriteoPublisherId:self.publisherId - withInventoryGroupId:@"" + withInventoryGroupId:@"" withStoreId:@"" withAdUnits:self.adUnits]; OCMVerify([self.loggingMock logMessage:[OCMArg checkWithBlock:^BOOL(CR_LogMessage *logMessage) { @@ -149,12 +149,12 @@ - (void)testCriteoRegister_ShouldBeLogged { - (void)testCriteoRegisterTwice_ShouldBeLogged { [self.criteo registerCriteoPublisherId:self.publisherId - withInventoryGroupId:self.inventoryGroupId + withInventoryGroupId:self.inventoryGroupId withStoreId:self.storeId withAdUnits:self.adUnits]; OCMVerify([self.loggingMock logMessage:[OCMArg any]]); [self.criteo registerCriteoPublisherId:self.publisherId - withInventoryGroupId:self.inventoryGroupId + withInventoryGroupId:self.inventoryGroupId withStoreId:self.storeId withAdUnits:self.adUnits]; OCMVerify([self.loggingMock logMessage:[OCMArg checkWithBlock:^BOOL(CR_LogMessage *logMessage) { diff --git a/CriteoPublisherSdk/Tests/UnitTests/CriteoTests.m b/CriteoPublisherSdk/Tests/UnitTests/CriteoTests.m index 41c01875..3b30f67e 100644 --- a/CriteoPublisherSdk/Tests/UnitTests/CriteoTests.m +++ b/CriteoPublisherSdk/Tests/UnitTests/CriteoTests.m @@ -96,7 +96,7 @@ - (void)testRegister_GivenNilPublisherId_LogError { NSString *nilInventoryGroupId = nil; NSString *nilStoreId = nil; [criteo registerCriteoPublisherId:nilPublisherId - withInventoryGroupId:nilInventoryGroupId + withInventoryGroupId:nilInventoryGroupId withStoreId:nilStoreId withAdUnits:@[]]; @@ -115,7 +115,7 @@ - (void)testRegister_GivenEmptyPublisherId_LogError { NSString *emptyInventoryGroupId = @""; NSString *emptyStoreId = @""; [criteo registerCriteoPublisherId:emptyPublisherId - withInventoryGroupId:emptyInventoryGroupId + withInventoryGroupId:emptyInventoryGroupId withStoreId:emptyStoreId withAdUnits:@[]]; @@ -330,7 +330,7 @@ - (void)registerWithMockedDependencyProvider:(void (^)(CR_DependencyProvider *)) testBlock(dependencyProviderMock); Criteo *criteo = [[Criteo alloc] initWithDependencyProvider:dependencyProviderMock]; [criteo registerCriteoPublisherId:@"testPublisherId" - withInventoryGroupId:@"testInventoryGroupId" + withInventoryGroupId:@"testInventoryGroupId" withStoreId:@"testStoreId" withAdUnits:@[]]; } diff --git a/CriteoPublisherSdk/Tests/Utility/Categories/CR_DependencyProvider+Testing.m b/CriteoPublisherSdk/Tests/Utility/Categories/CR_DependencyProvider+Testing.m index 89bff12e..dde4ac79 100644 --- a/CriteoPublisherSdk/Tests/Utility/Categories/CR_DependencyProvider+Testing.m +++ b/CriteoPublisherSdk/Tests/Utility/Categories/CR_DependencyProvider+Testing.m @@ -56,7 +56,7 @@ - (NSString *)wireMockEndPoint:(NSString *)path { - (CR_DependencyProvider *)withWireMockConfiguration { self.config = [[CR_Config alloc] initWithCriteoPublisherId:CriteoTestingPublisherId - inventoryGroupId:CriteoTestingInventoryGroupId + inventoryGroupId:CriteoTestingInventoryGroupId storeId:CriteoTestingStoreId cdbUrl:[self wireMockEndPoint:@"cdb"] appEventsUrl:[self wireMockEndPoint:@"gum/appevent/v1"] diff --git a/CriteoPublisherSdk/Tests/Utility/Categories/Criteo+Testing.m b/CriteoPublisherSdk/Tests/Utility/Categories/Criteo+Testing.m index 997cee6e..6842e49c 100644 --- a/CriteoPublisherSdk/Tests/Utility/Categories/Criteo+Testing.m +++ b/CriteoPublisherSdk/Tests/Utility/Categories/Criteo+Testing.m @@ -110,7 +110,7 @@ - (void)testing_registerBanner { - (void)testing_registerWithAdUnits:(NSArray *)adUnits { [self registerCriteoPublisherId:CriteoTestingPublisherId - withInventoryGroupId:CriteoTestingInventoryGroupId + withInventoryGroupId:CriteoTestingInventoryGroupId withStoreId:CriteoTestingStoreId withAdUnits:adUnits]; }