From ceb9af2241d1f4dd58fa87c495d524fa85725a87 Mon Sep 17 00:00:00 2001 From: Vitalii Pavlenko Date: Wed, 12 Jun 2024 16:41:21 +0200 Subject: [PATCH] release 6.2.0-rc1 --- CHANGELOG.md | 8 + .../CriteoAdViewer.xcodeproj/project.pbxproj | 66 ++------ CriteoAdViewer/Podfile | 5 +- CriteoAdViewer/Podfile.lock | 71 ++------- .../CriteoGoogleAdapter/CRBannerCustomEvent.h | 27 ---- .../CriteoGoogleAdapter/CRBannerCustomEvent.m | 122 --------------- .../CriteoGoogleAdapter/CRCustomEvent.h | 32 ---- .../CriteoGoogleAdapter/CRCustomEvent.m | 54 ------- .../CRGoogleMediationParameters.h | 39 ----- .../CRGoogleMediationParameters.m | 89 ----------- .../CRInterstitialCustomEvent.h | 28 ---- .../CRInterstitialCustomEvent.m | 145 ------------------ CriteoAdViewer/Sources/Info.plist | 2 +- CriteoAdViewer/UITests/Info.plist | 2 +- .../project.pbxproj | 14 +- .../CriteoGoogleAdapter/CRBannerCustomEvent.m | 4 +- .../CRInterstitialCustomEvent.m | 4 +- .../Sources/CriteoGoogleAdapter/Info.plist | 2 +- .../Tests/CriteoGoogleAdapterTests/Info.plist | 2 +- CriteoPublisherSdk.podspec | 4 +- .../project.pbxproj | 16 +- .../Sources/Configuration/CR_DeviceInfo.m | 9 +- .../Sources/Context/CREmailHasher.m | 7 +- CriteoPublisherSdk/Sources/Info.plist | 2 +- .../Sources/Public/CRConstants.h | 2 +- .../Tests/CriteoPublisherSdkTests-Info.plist | 2 +- CriteoPublisherSdk/iTestHostApp/Info.plist | 2 +- Podfile | 8 +- Podfile.lock | 70 ++------- 29 files changed, 101 insertions(+), 737 deletions(-) delete mode 100644 CriteoAdViewer/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.h delete mode 100644 CriteoAdViewer/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m delete mode 100644 CriteoAdViewer/Sources/CriteoGoogleAdapter/CRCustomEvent.h delete mode 100644 CriteoAdViewer/Sources/CriteoGoogleAdapter/CRCustomEvent.m delete mode 100644 CriteoAdViewer/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.h delete mode 100644 CriteoAdViewer/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.m delete mode 100644 CriteoAdViewer/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.h delete mode 100644 CriteoAdViewer/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m diff --git a/CHANGELOG.md b/CHANGELOG.md index d14455f9d..fa5214e48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Criteo Publisher SDK Changelog +-------------------------------------------------------------------------------- +## Version [6.2.0] + +### Features +- Updated Google-Mobile-Ads-SDK to v11 +- Bumped min iOS version to iOS 13 +- Update AdViewer dependencies + -------------------------------------------------------------------------------- ## Version [6.1.2] diff --git a/CriteoAdViewer/CriteoAdViewer.xcodeproj/project.pbxproj b/CriteoAdViewer/CriteoAdViewer.xcodeproj/project.pbxproj index 56afcaced..f6ce3f43a 100644 --- a/CriteoAdViewer/CriteoAdViewer.xcodeproj/project.pbxproj +++ b/CriteoAdViewer/CriteoAdViewer.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -36,10 +36,7 @@ 7DE88E5B248FA35B00F15D74 /* AdTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE88E5A248FA35B00F15D74 /* AdTableViewController.swift */; }; A828E839293F7803006AD697 /* GAMAdViewBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = A828E838293F7803006AD697 /* GAMAdViewBuilder.swift */; }; A828E83B293F7849006AD697 /* InterstitialView+ads.swift in Sources */ = {isa = PBXBuildFile; fileRef = A828E83A293F7849006AD697 /* InterstitialView+ads.swift */; }; - A828E845293F7978006AD697 /* CRBannerCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A828E83D293F7978006AD697 /* CRBannerCustomEvent.m */; }; - A828E846293F7978006AD697 /* CRGoogleMediationParameters.m in Sources */ = {isa = PBXBuildFile; fileRef = A828E83E293F7978006AD697 /* CRGoogleMediationParameters.m */; }; - A828E847293F7978006AD697 /* CRCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A828E842293F7978006AD697 /* CRCustomEvent.m */; }; - A828E848293F7978006AD697 /* CRInterstitialCustomEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A828E844293F7978006AD697 /* CRInterstitialCustomEvent.m */; }; + DBDC5D192C122BBA003BFC1D /* CriteoGoogleAdapter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBDC5D182C122BBA003BFC1D /* CriteoGoogleAdapter.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -52,19 +49,6 @@ }; /* End PBXContainerItemProxy section */ -/* Begin PBXCopyFilesBuildPhase section */ - 54CAF8C6232C05B10050D8D9 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 02AF9A62F91F0010DBFC28A3 /* Pods-CriteoAdViewer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CriteoAdViewer.debug.xcconfig"; path = "Target Support Files/Pods-CriteoAdViewer/Pods-CriteoAdViewer.debug.xcconfig"; sourceTree = ""; }; 198CD1615965A5E039286CB4 /* AdFormat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdFormat.swift; sourceTree = ""; }; @@ -114,14 +98,7 @@ 7DE88E5A248FA35B00F15D74 /* AdTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdTableViewController.swift; sourceTree = ""; }; A828E838293F7803006AD697 /* GAMAdViewBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GAMAdViewBuilder.swift; sourceTree = ""; }; A828E83A293F7849006AD697 /* InterstitialView+ads.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "InterstitialView+ads.swift"; sourceTree = ""; }; - A828E83D293F7978006AD697 /* CRBannerCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRBannerCustomEvent.m; sourceTree = ""; }; - A828E83E293F7978006AD697 /* CRGoogleMediationParameters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRGoogleMediationParameters.m; sourceTree = ""; }; - A828E83F293F7978006AD697 /* CRCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRCustomEvent.h; sourceTree = ""; }; - A828E840293F7978006AD697 /* CRInterstitialCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRInterstitialCustomEvent.h; sourceTree = ""; }; - A828E841293F7978006AD697 /* CRBannerCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRBannerCustomEvent.h; sourceTree = ""; }; - A828E842293F7978006AD697 /* CRCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRCustomEvent.m; sourceTree = ""; }; - A828E843293F7978006AD697 /* CRGoogleMediationParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRGoogleMediationParameters.h; sourceTree = ""; }; - A828E844293F7978006AD697 /* CRInterstitialCustomEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CRInterstitialCustomEvent.m; sourceTree = ""; }; + DBDC5D182C122BBA003BFC1D /* CriteoGoogleAdapter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CriteoGoogleAdapter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -130,6 +107,7 @@ buildActionMask = 2147483647; files = ( 7DC4A1D523EC73A20027DB5E /* CriteoPublisherSdk.framework in Frameworks */, + DBDC5D192C122BBA003BFC1D /* CriteoGoogleAdapter.framework in Frameworks */, 1BA1F5FDF6FEA87C9F2FAC25 /* libPods-CriteoAdViewer.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -170,6 +148,7 @@ 4077EBA5218BC48300C41E68 /* Products */, AEB379A3E47D7093DEBA6DA1 /* Frameworks */, A2CF8BAD22F57242F276594C /* Pods */, + DBF3D2302C18386100521898 /* Recovered References */, ); sourceTree = ""; }; @@ -185,7 +164,6 @@ 4077EBA6218BC48300C41E68 /* Sources */ = { isa = PBXGroup; children = ( - A828E83C293F7978006AD697 /* CriteoGoogleAdapter */, 462A60712417DB1C00E36D33 /* AdViewer */, 7D03F10623F1949900CB5D8B /* NativeAd */, 54B579122369CE09004DF616 /* Common */, @@ -295,21 +273,6 @@ path = ../Pods; sourceTree = ""; }; - A828E83C293F7978006AD697 /* CriteoGoogleAdapter */ = { - isa = PBXGroup; - children = ( - A828E83D293F7978006AD697 /* CRBannerCustomEvent.m */, - A828E83E293F7978006AD697 /* CRGoogleMediationParameters.m */, - A828E83F293F7978006AD697 /* CRCustomEvent.h */, - A828E840293F7978006AD697 /* CRInterstitialCustomEvent.h */, - A828E841293F7978006AD697 /* CRBannerCustomEvent.h */, - A828E842293F7978006AD697 /* CRCustomEvent.m */, - A828E843293F7978006AD697 /* CRGoogleMediationParameters.h */, - A828E844293F7978006AD697 /* CRInterstitialCustomEvent.m */, - ); - path = CriteoGoogleAdapter; - sourceTree = ""; - }; AEB379A3E47D7093DEBA6DA1 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -319,6 +282,14 @@ path = Frameworks; sourceTree = ""; }; + DBF3D2302C18386100521898 /* Recovered References */ = { + isa = PBXGroup; + children = ( + DBDC5D182C122BBA003BFC1D /* CriteoGoogleAdapter.framework */, + ); + name = "Recovered References"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -330,7 +301,6 @@ 4077EBA0218BC48300C41E68 /* Sources */, 4077EBA1218BC48300C41E68 /* Frameworks */, 4077EBA2218BC48300C41E68 /* Resources */, - 54CAF8C6232C05B10050D8D9 /* Embed Frameworks */, 06439DA2052675F0102C4A26 /* [CP] Copy Pods Resources */, ); buildRules = ( @@ -466,20 +436,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A828E848293F7978006AD697 /* CRInterstitialCustomEvent.m in Sources */, - A828E846293F7978006AD697 /* CRGoogleMediationParameters.m in Sources */, 467A28E924168A1B00CEF5C7 /* EventLogEntry.m in Sources */, 4687264E240E9D7E0090489E /* LogTableViewController.swift in Sources */, 46151AB2240EC74100D514BE /* LogEntryViewController.swift in Sources */, 46151AB8240FC10F00D514BE /* ResponseLogEntry.m in Sources */, - A828E847293F7978006AD697 /* CRCustomEvent.m in Sources */, 46151AB5240FB8A500D514BE /* RequestLogEntry.m in Sources */, A828E83B293F7849006AD697 /* InterstitialView+ads.swift in Sources */, A828E839293F7803006AD697 /* GAMAdViewBuilder.swift in Sources */, 462A60662417A6C100E36D33 /* GoogleDFPLogger.m in Sources */, 462A60762417E56900E36D33 /* AdViewBuilder.swift in Sources */, 46872655240EA31B0090489E /* LogManager.m in Sources */, - A828E845293F7978006AD697 /* CRBannerCustomEvent.m in Sources */, 462A60732417DB5000E36D33 /* AdViewerViewController.swift in Sources */, 46505306256FE544007D9CE7 /* AppDelegate.swift in Sources */, 198CD402321085699A33FEF8 /* StandaloneLogger.m in Sources */, @@ -585,7 +551,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -639,7 +605,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -669,6 +635,7 @@ "$(PROJECT_DIR)/**", ); INFOPLIST_FILE = Sources/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -709,6 +676,7 @@ "$(PROJECT_DIR)/**", ); INFOPLIST_FILE = Sources/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/CriteoAdViewer/Podfile b/CriteoAdViewer/Podfile index d7fca25a6..4cce6514e 100644 --- a/CriteoAdViewer/Podfile +++ b/CriteoAdViewer/Podfile @@ -1,13 +1,12 @@ -platform :ios, '10.0' +platform :ios, '13.0' workspace 'CriteoAdViewer' target 'CriteoAdViewer' do project 'CriteoAdViewer' - pod 'CriteoPublisherSdk', '~> 4.3.0-rc1' + pod 'CriteoPublisherSdk', '~> 6.1.2' # pod 'CriteoPublisherSdk', :git => 'https://github.com/criteo/ios-publisher-sdk.git' #, :branch => '' - pod 'mopub-ios-sdk/Core' pod 'Google-Mobile-Ads-SDK' pod 'Eureka' end diff --git a/CriteoAdViewer/Podfile.lock b/CriteoAdViewer/Podfile.lock index a76d99e12..dfd0be993 100644 --- a/CriteoAdViewer/Podfile.lock +++ b/CriteoAdViewer/Podfile.lock @@ -1,72 +1,35 @@ PODS: - - CriteoPublisherSdk (4.3.0-rc1): - - CriteoPublisherSdk/Sdk (= 4.3.0-rc1) - - CriteoPublisherSdk/Sdk (4.3.0-rc1) + - CriteoMRAID (1.0.1) + - CriteoPublisherSdk (6.1.2): + - CriteoMRAID (~> 1.0.1) + - CriteoPublisherSdk/Sdk (= 6.1.2) + - CriteoPublisherSdk/Sdk (6.1.2): + - CriteoMRAID (~> 1.0.1) - Eureka (5.3.2) - - Google-Mobile-Ads-SDK (8.1.0): - - GoogleAppMeasurement (~> 7.0) - - GoogleUserMessagingPlatform (~> 1.1) - - GoogleAppMeasurement (7.7.0): - - GoogleUtilities/AppDelegateSwizzler (~> 7.0) - - GoogleUtilities/MethodSwizzler (~> 7.0) - - GoogleUtilities/Network (~> 7.0) - - "GoogleUtilities/NSData+zlib (~> 7.0)" - - nanopb (~> 2.30907.0) - - GoogleUserMessagingPlatform (1.4.0) - - GoogleUtilities/AppDelegateSwizzler (7.2.2): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (7.2.2): - - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (7.2.2): - - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (7.2.2): - - GoogleUtilities/Logger - - GoogleUtilities/Network (7.2.2): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.2.2)" - - GoogleUtilities/Reachability (7.2.2): - - GoogleUtilities/Logger - - mopub-ios-sdk/Core (5.16.1) - - nanopb (2.30907.0): - - nanopb/decode (= 2.30907.0) - - nanopb/encode (= 2.30907.0) - - nanopb/decode (2.30907.0) - - nanopb/encode (2.30907.0) - - PromisesObjC (1.2.12) + - Google-Mobile-Ads-SDK (11.5.0): + - GoogleUserMessagingPlatform (>= 1.1) + - GoogleUserMessagingPlatform (2.4.0) DEPENDENCIES: - - CriteoPublisherSdk (~> 4.3.0-rc1) + - CriteoPublisherSdk (~> 6.1.2) - Eureka - Google-Mobile-Ads-SDK - - mopub-ios-sdk/Core SPEC REPOS: trunk: + - CriteoMRAID - CriteoPublisherSdk - Eureka - Google-Mobile-Ads-SDK - - GoogleAppMeasurement - GoogleUserMessagingPlatform - - GoogleUtilities - - mopub-ios-sdk - - nanopb - - PromisesObjC SPEC CHECKSUMS: - CriteoPublisherSdk: a41d7f9fa916e47d6308f427f67dcc26a27fd844 + CriteoMRAID: a037bee17b929a8bede8a07279e01a269cd85210 + CriteoPublisherSdk: 710001048da8bde09116fc9812c879d4cdfcd480 Eureka: 1c2b8b5892bfb0e972d0fe05f8c09fd89f8625ec - Google-Mobile-Ads-SDK: efb7fb74595668fbbe680f0d1c06f9a8ff694c7c - GoogleAppMeasurement: 0c3b134b2c0a90c4c24833873894bfe0e42a0384 - GoogleUserMessagingPlatform: b168e8c46cd8f92aa3e34b584c4ca78a411ce367 - GoogleUtilities: 31c5b01f978a70c6cff2afc6272b3f1921614b43 - mopub-ios-sdk: d207b434e6aef9c2f57423512e5eda1edf82930f - nanopb: 59221d7f958fb711001e6a449489542d92ae113e - PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 + Google-Mobile-Ads-SDK: 7db2098033ad3bfcd72a11e7503b49700a93029e + GoogleUserMessagingPlatform: f131fa7978d2ba88d7426702b057c2cc318e6595 -PODFILE CHECKSUM: 2658a507d07fe992aa9ac24759a37553d5e74c1a +PODFILE CHECKSUM: 12a302b23b5f4259f745dda32753c8951d5f0ed2 -COCOAPODS: 1.10.1 +COCOAPODS: 1.15.2 diff --git a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.h b/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.h deleted file mode 100644 index a0b92f381..000000000 --- a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// CRBannerCustomEvent.h -// CriteoGoogleAdapter -// -// Copyright © 2018-2022 Criteo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "CRCustomEvent.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface CRBannerCustomEvent : CRCustomEvent -@end - -NS_ASSUME_NONNULL_END diff --git a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m b/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m deleted file mode 100644 index b6bb2e8e1..000000000 --- a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m +++ /dev/null @@ -1,122 +0,0 @@ -// -// CRBannerCustomEvent.m -// CriteoGoogleAdapter -// -// Copyright © 2018-2022 Criteo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "CRBannerCustomEvent.h" -#include -#import "CRGoogleMediationParameters.h" - -@interface CRBannerCustomEvent () { - // The banner completion handler to call when the ad loading succeeds or fails. - GADMediationBannerLoadCompletionHandler _completionHandler; - // The ad event delegate to forward ad rendering events to the Google Mobile Ads SDK. - id _delegate; -} - -@property(nonatomic, strong) CRBannerView *bannerView; - -- (void)loadBannerForAdUnit:(CRBannerAdUnit *)adUnit - mediationParams:(CRGoogleMediationParameters *)params - childDirectedTreatment:(NSNumber *)childDirectedTreatment; - -@end - -@implementation CRBannerCustomEvent - -#pragma mark Private methods. -- (void)loadBannerForAdUnit:(CRBannerAdUnit *)adUnit - mediationParams:(CRGoogleMediationParameters *)params - childDirectedTreatment:(NSNumber *)childDirectedTreatment { - /// Set the publicher id to - [Criteo.sharedCriteo registerCriteoPublisherId:params.publisherId - withStoreId:params.storeId - withAdUnits:@[ adUnit ]]; - /// Set child directed treatment flag to Criteo SDK. - [Criteo.sharedCriteo setChildDirectedTreatment:childDirectedTreatment]; - if (self.bannerView == nil) { - self.bannerView = [[CRBannerView alloc] initWithAdUnit:adUnit]; - } - [self.bannerView setDelegate:self]; - [self.bannerView loadAd]; -} - -#pragma mark GADMediationAdapter implementation for Banner ad. -- (void)loadBannerForAdConfiguration:(GADMediationBannerAdConfiguration *)adConfiguration - completionHandler:(GADMediationBannerLoadCompletionHandler)completionHandler { - __block atomic_flag completionHandlerCalled = ATOMIC_FLAG_INIT; - __block GADMediationBannerLoadCompletionHandler originalCompletionHandler = - [completionHandler copy]; - _completionHandler = ^id(_Nullable id ad, - NSError *_Nullable error) { - // Only allow completion handler to be called once. - if (atomic_flag_test_and_set(&completionHandlerCalled)) { - return nil; - } - - id delegate = nil; - if (originalCompletionHandler) { - // Call original handler and hold on to its return value. - delegate = originalCompletionHandler(ad, error); - } - - // Release reference to handler. Objects retained by the handler will also be released. - originalCompletionHandler = nil; - - return delegate; - }; - - /// Extract ad unit id from the ad configuration. - NSString *json = adConfiguration.credentials.settings[@"parameter"]; - NSError *jsonError; - CRGoogleMediationParameters *params = - [CRGoogleMediationParameters parametersFromJSONString:json error:&jsonError]; - if (jsonError) { - _delegate = completionHandler(nil, [self noFillError:jsonError]); - return; - } - /// Create an ad unit - CRBannerAdUnit *adUnit = [[CRBannerAdUnit alloc] initWithAdUnitId:params.adUnitId - size:adConfiguration.adSize.size]; - /// Load ad banner - [self loadBannerForAdUnit:adUnit - mediationParams:params - childDirectedTreatment:adConfiguration.childDirectedTreatment]; -} - -#pragma mark GADMediationBannerAd implementation - -- (nonnull UIView *)view { - return self.bannerView; -} - -#pragma mark CRBannerViewDelegate implementation - -- (void)bannerDidReceiveAd:(CRBannerView *)bannerView { - _delegate = _completionHandler(self, nil); -} - -- (void)banner:(CRBannerView *)bannerView didFailToReceiveAdWithError:(NSError *)error { - NSError *bannerError = [self noFillError:error]; - _delegate = _completionHandler(nil, bannerError); -} - -- (void)bannerWillLeaveApplication:(CRBannerView *)bannerView { - [_delegate reportClick]; -} - -@end diff --git a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRCustomEvent.h b/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRCustomEvent.h deleted file mode 100644 index e495ae2f8..000000000 --- a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRCustomEvent.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// CRCustomEvent.h -// CriteoGoogleAdapter -// -// Copyright © 2018-2022 Criteo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface CRCustomEvent : NSObject - -- (NSError *)noFillError:(NSError *)error; - -@end - -NS_ASSUME_NONNULL_END diff --git a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRCustomEvent.m b/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRCustomEvent.m deleted file mode 100644 index 74681f670..000000000 --- a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRCustomEvent.m +++ /dev/null @@ -1,54 +0,0 @@ -// -// CRCustomEvent.m -// CriteoGoogleAdapter -// -// Copyright © 2018-2022 Criteo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "CRCustomEvent.h" - -@implementation CRCustomEvent -+ (GADVersionNumber)adSDKVersion { - NSArray *versionComponents = [CRITEO_PUBLISHER_SDK_VERSION componentsSeparatedByString:@"."]; - GADVersionNumber version = {0}; - if (versionComponents.count >= 3) { - version.majorVersion = [versionComponents[0] integerValue]; - version.minorVersion = [versionComponents[1] integerValue]; - version.patchVersion = [versionComponents[2] integerValue]; - } - return version; -} - -+ (GADVersionNumber)adapterVersion { - return [CRCustomEvent adSDKVersion]; -} - -+ (nullable Class)networkExtrasClass { - return Nil; -} - -+ (void)setUpWithConfiguration:(GADMediationServerConfiguration *)configuration - completionHandler:(GADMediationAdapterSetUpCompletionBlock)completionHandler { - completionHandler(nil); -} - -- (NSError *)noFillError:(NSError *)error { - return [NSError errorWithDomain:GADErrorDomain - code:GADErrorNoFill - userInfo:[NSDictionary dictionaryWithObject:error.description - forKey:NSLocalizedDescriptionKey]]; -} - -@end diff --git a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.h b/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.h deleted file mode 100644 index c4de802c3..000000000 --- a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// CRGoogleMediationParameters.h -// CriteoGoogleAdapter -// -// Copyright © 2018-2022 Criteo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface CRGoogleMediationParameters : NSObject - -- (instancetype)init NS_UNAVAILABLE; -- (id)initWithPublisherId:(NSString *)publisherId - storeId:(NSString *)storeId - adUnitId:(NSString *)adUnitId; -+ (nullable CRGoogleMediationParameters *)parametersFromJSONString:(NSString *)jsonString - error:(NSError **)outError; - -@property(copy, readonly) NSString *publisherId; -@property(copy, readonly) NSString *adUnitId; -@property(copy, readonly) NSString *storeId; - -@end - -NS_ASSUME_NONNULL_END diff --git a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.m b/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.m deleted file mode 100644 index 11b6cd1e4..000000000 --- a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRGoogleMediationParameters.m +++ /dev/null @@ -1,89 +0,0 @@ -// -// CRGoogleMediationParameters.m -// CriteoGoogleAdapter -// -// Copyright © 2018-2022 Criteo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "CRGoogleMediationParameters.h" -@import GoogleMobileAds; - -static NSString *const criteoGoogleMediationPublisherIdKey = @"cpId"; -static NSString *const criteoGoogleMediationAdUnitIdKey = @"adUnitId"; -static NSString *const criteoGoogleMediationStoreIdKey = @"storeId"; - -static void setJSONParsingError(NSError **error) { - if (error != nil) { - *error = [NSError errorWithDomain:GADErrorDomain code:GADErrorInvalidArgument userInfo:nil]; - } -} - -static NSString *nonEmptyStringFromObj(id obj) { - if (obj == nil || ![obj isKindOfClass:[NSString class]]) { - return nil; - } - NSString *str = (NSString *)obj; - if (str.length == 0) { - return nil; - } - return str; -} - -@implementation CRGoogleMediationParameters - -- (id)initWithPublisherId:(NSString *)publisherId - storeId:(NSString *)storeId - adUnitId:(NSString *)adUnitId { - self = [super init]; - if (self == nil) { - return nil; - } - _publisherId = [NSString stringWithString:publisherId]; - _adUnitId = [NSString stringWithString:adUnitId]; - _storeId = [NSString stringWithString:storeId]; - return self; -} - -// Create the object with a string such as {"cpId":"B-056946", "adUnitID": -// "/140800857/Endeavour_320x50"} -+ (nullable CRGoogleMediationParameters *)parametersFromJSONString:(NSString *)jsonString - error:(NSError **)error { - NSData *data = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - if (jsonString == nil || data == nil) { - setJSONParsingError(error); - return nil; - } - NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:data - options:kNilOptions - error:nil]; - if (jsonDict == nil) { - setJSONParsingError(error); - return nil; - } - NSString *pubId = nonEmptyStringFromObj(jsonDict[criteoGoogleMediationPublisherIdKey]); - NSString *adId = nonEmptyStringFromObj(jsonDict[criteoGoogleMediationAdUnitIdKey]); - NSString *storeId = nonEmptyStringFromObj(jsonDict[criteoGoogleMediationStoreIdKey]); - if (pubId == nil || adId == nil) { - setJSONParsingError(error); - return nil; - } - if (error != nil) { - *error = nil; - } - return [[CRGoogleMediationParameters alloc] initWithPublisherId:pubId - storeId:storeId - adUnitId:adId]; -} -@end diff --git a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.h b/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.h deleted file mode 100644 index 325676b42..000000000 --- a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// CRInterstitialCustomEvent.h -// CriteoGoogleAdapter -// -// Copyright © 2018-2022 Criteo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "CRCustomEvent.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface CRInterstitialCustomEvent : CRCustomEvent - -@end - -NS_ASSUME_NONNULL_END diff --git a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m b/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m deleted file mode 100644 index eb1111922..000000000 --- a/CriteoAdViewer/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m +++ /dev/null @@ -1,145 +0,0 @@ -// -// CRInterstitialCustomEvent.m -// CriteoGoogleAdapter -// -// Copyright © 2018-2022 Criteo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "CRInterstitialCustomEvent.h" -#import "CRGoogleMediationParameters.h" -#include -@import GoogleMobileAds; - -@interface CRInterstitialCustomEvent () { - /// The completion handler to call when the ad loading succeeds or fails. - GADMediationInterstitialLoadCompletionHandler _completionHandler; - /// The ad event delegate to forward ad rendering events to the Google Mobile Ads SDK. - id _delegate; -} - -@property(nonatomic, strong) CRInterstitial *interstitial; - -- (void)loadInterstitialForAdUnit:(CRInterstitialAdUnit *)adUnit - adConfiguration:(CRGoogleMediationParameters *)params - childDirectedTreatment:(NSNumber *)childDirectedTreatment; -@end - -@implementation CRInterstitialCustomEvent - -#pragma mark Private methods. -- (void)loadInterstitialForAdUnit:(CRInterstitialAdUnit *)adUnit - adConfiguration:(CRGoogleMediationParameters *)params - childDirectedTreatment:(NSNumber *)childDirectedTreatment { - [Criteo.sharedCriteo registerCriteoPublisherId:params.publisherId - withStoreId:params.storeId - withAdUnits:@[ adUnit ]]; - /// Set child directed treatment flag to Criteo SDK. - [Criteo.sharedCriteo setChildDirectedTreatment:childDirectedTreatment]; - if (!self.interstitial) { - self.interstitial = [[CRInterstitial alloc] initWithAdUnit:adUnit]; - } - [self.interstitial setDelegate:self]; - [self.interstitial loadAd]; -} - -#pragma mark GADMediationAdapter implementation for Interstitial ad. -- (void)loadInterstitialForAdConfiguration: - (GADMediationInterstitialAdConfiguration *)adConfiguration - completionHandler: - (GADMediationInterstitialLoadCompletionHandler)completionHandler { - __block atomic_flag completionHandlerCalled = ATOMIC_FLAG_INIT; - __block GADMediationInterstitialLoadCompletionHandler originalCompletionHandler = - [completionHandler copy]; - - _completionHandler = ^id( - _Nullable id ad, NSError *_Nullable error) { - // Only allow completion handler to be called once. - if (atomic_flag_test_and_set(&completionHandlerCalled)) { - return nil; - } - - id delegate = nil; - if (originalCompletionHandler) { - // Call original handler and hold on to its return value. - delegate = originalCompletionHandler(ad, error); - } - - // Release reference to handler. Objects retained by the handler will also be released. - originalCompletionHandler = nil; - - return delegate; - }; - - /// Extract ad unit id from the ad configuration. - NSString *json = adConfiguration.credentials.settings[@"parameter"]; - NSError *jsonError; - CRGoogleMediationParameters *params = - [CRGoogleMediationParameters parametersFromJSONString:json error:&jsonError]; - if (jsonError) { - _delegate = completionHandler(nil, [self noFillError:jsonError]); - return; - } - /// Create the ad unit - CRInterstitialAdUnit *adUnit = [[CRInterstitialAdUnit alloc] initWithAdUnitId:params.adUnitId]; - /// Load Interstitial ad. - [self loadInterstitialForAdUnit:adUnit - adConfiguration:params - childDirectedTreatment:adConfiguration.childDirectedTreatment]; -} - -#pragma mark GADMediationInterstitialAd implementation -- (void)presentFromViewController:(nonnull UIViewController *)viewController { - if ([self.interstitial isAdLoaded]) { - [self.interstitial presentFromRootViewController:viewController]; - } else { - NSDictionary *userInfo = [[NSDictionary alloc] init]; - [userInfo setValue:@"The interstitial ad failed to present because the ad was not loaded." - forKey:NSLocalizedDescriptionKey]; - NSError *error = [NSError errorWithDomain:GADErrorDomain - code:GADErrorInvalidArgument - userInfo:userInfo]; - _delegate = _completionHandler(nil, error); - } -} - -#pragma mark CRInterstitialDelegate implementation -// These callbacks are called on the main thread from the Criteo SDK -- (void)interstitialDidReceiveAd:(CRInterstitial *)interstitial { - _delegate = _completionHandler(self, nil); -} - -- (void)interstitial:(CRInterstitial *)interstitial didFailToReceiveAdWithError:(NSError *)error { - NSError *interstitialError = [self noFillError:error]; - _delegate = _completionHandler(nil, interstitialError); -} - -- (void)interstitialWillAppear:(CRInterstitial *)interstitial { - [_delegate willPresentFullScreenView]; - [_delegate reportImpression]; -} - -- (void)interstitialWillDisappear:(CRInterstitial *)interstitial { - [_delegate willDismissFullScreenView]; -} - -- (void)interstitialDidDisappear:(CRInterstitial *)interstitial { - [_delegate didDismissFullScreenView]; -} - -- (void)interstitialWillLeaveApplication:(CRInterstitial *)interstitial { - [_delegate reportClick]; -} - -@end diff --git a/CriteoAdViewer/Sources/Info.plist b/CriteoAdViewer/Sources/Info.plist index a5f07867c..17db209e9 100644 --- a/CriteoAdViewer/Sources/Info.plist +++ b/CriteoAdViewer/Sources/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 6.1.2 + 6.2.0 CFBundleURLTypes diff --git a/CriteoAdViewer/UITests/Info.plist b/CriteoAdViewer/UITests/Info.plist index f4017cbdf..2460f3b76 100644 --- a/CriteoAdViewer/UITests/Info.plist +++ b/CriteoAdViewer/UITests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 6.1.2 + 6.2.0 CFBundleVersion 1 diff --git a/CriteoGoogleAdapter/CriteoGoogleAdapter.xcodeproj/project.pbxproj b/CriteoGoogleAdapter/CriteoGoogleAdapter.xcodeproj/project.pbxproj index f9a96650d..4ac0b870c 100644 --- a/CriteoGoogleAdapter/CriteoGoogleAdapter.xcodeproj/project.pbxproj +++ b/CriteoGoogleAdapter/CriteoGoogleAdapter.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -447,7 +447,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -504,7 +504,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -535,7 +535,7 @@ ); INFOPLIST_FILE = Sources/CriteoGoogleAdapter/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -568,7 +568,7 @@ ); INFOPLIST_FILE = Sources/CriteoGoogleAdapter/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -594,7 +594,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = Tests/CriteoGoogleAdapterTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -621,7 +621,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = Tests/CriteoGoogleAdapterTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m index b6bb2e8e1..2f8544911 100644 --- a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m +++ b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRBannerCustomEvent.m @@ -92,10 +92,12 @@ - (void)loadBannerForAdConfiguration:(GADMediationBannerAdConfiguration *)adConf /// Create an ad unit CRBannerAdUnit *adUnit = [[CRBannerAdUnit alloc] initWithAdUnitId:params.adUnitId size:adConfiguration.adSize.size]; + NSNumber *childDirectedTreatment = + GADMobileAds.sharedInstance.requestConfiguration.tagForChildDirectedTreatment; /// Load ad banner [self loadBannerForAdUnit:adUnit mediationParams:params - childDirectedTreatment:adConfiguration.childDirectedTreatment]; + childDirectedTreatment:childDirectedTreatment]; } #pragma mark GADMediationBannerAd implementation diff --git a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m index eb1111922..331b99bc6 100644 --- a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m +++ b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/CRInterstitialCustomEvent.m @@ -93,10 +93,12 @@ - (void)loadInterstitialForAdConfiguration: } /// Create the ad unit CRInterstitialAdUnit *adUnit = [[CRInterstitialAdUnit alloc] initWithAdUnitId:params.adUnitId]; + NSNumber *childDirectedTreatment = + GADMobileAds.sharedInstance.requestConfiguration.tagForChildDirectedTreatment; /// Load Interstitial ad. [self loadInterstitialForAdUnit:adUnit adConfiguration:params - childDirectedTreatment:adConfiguration.childDirectedTreatment]; + childDirectedTreatment:childDirectedTreatment]; } #pragma mark GADMediationInterstitialAd implementation diff --git a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/Info.plist b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/Info.plist index 05e221814..4147d585d 100644 --- a/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/Info.plist +++ b/CriteoGoogleAdapter/Sources/CriteoGoogleAdapter/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 6.1.2 + 6.2.0 CFBundleVersion 1 diff --git a/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/Info.plist b/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/Info.plist index f4017cbdf..2460f3b76 100644 --- a/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/Info.plist +++ b/CriteoGoogleAdapter/Tests/CriteoGoogleAdapterTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 6.1.2 + 6.2.0 CFBundleVersion 1 diff --git a/CriteoPublisherSdk.podspec b/CriteoPublisherSdk.podspec index 0c13f2cfb..198a81844 100644 --- a/CriteoPublisherSdk.podspec +++ b/CriteoPublisherSdk.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "CriteoPublisherSdk" - spec.version = "6.1.2" + spec.version = "6.2.0-rc1" spec.summary = "Criteo Publisher SDK for iOS" spec.description = <<-DESC @@ -38,7 +38,7 @@ Pod::Spec.new do |spec| spec.subspec "GoogleAdapter" do |adapter| adapter.source_files = "CriteoGoogleAdapter/Sources/**/*.{h,m}" adapter.dependency "CriteoPublisherSdk/Sdk" - adapter.dependency "Google-Mobile-Ads-SDK", "~> 10.1.0" + adapter.dependency "Google-Mobile-Ads-SDK", "~> 11.1.0" end diff --git a/CriteoPublisherSdk/CriteoPublisherSdk.xcodeproj/project.pbxproj b/CriteoPublisherSdk/CriteoPublisherSdk.xcodeproj/project.pbxproj index 89a3219f1..cd803945c 100644 --- a/CriteoPublisherSdk/CriteoPublisherSdk.xcodeproj/project.pbxproj +++ b/CriteoPublisherSdk/CriteoPublisherSdk.xcodeproj/project.pbxproj @@ -2588,7 +2588,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2617,7 +2617,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Sources/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2640,7 +2640,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = S655EV5659; INFOPLIST_FILE = iTestHostApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2658,7 +2658,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = S655EV5659; INFOPLIST_FILE = iTestHostApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2725,7 +2725,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -2785,7 +2785,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -2803,7 +2803,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = S655EV5659; INFOPLIST_FILE = "Tests/CriteoPublisherSdkTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -2827,7 +2827,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = S655EV5659; INFOPLIST_FILE = "Tests/CriteoPublisherSdkTests-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/CriteoPublisherSdk/Sources/Configuration/CR_DeviceInfo.m b/CriteoPublisherSdk/Sources/Configuration/CR_DeviceInfo.m index 662ff6711..79ce2b259 100644 --- a/CriteoPublisherSdk/Sources/Configuration/CR_DeviceInfo.m +++ b/CriteoPublisherSdk/Sources/Configuration/CR_DeviceInfo.m @@ -140,8 +140,13 @@ - (CGSize)screenSize { } - (CGSize)safeScreenSize { - if (@available(iOS 11.0, *)) { - UIWindow *keyWindow = UIApplication.sharedApplication.keyWindow; + if (@available(iOS 13.0, *)) { + NSPredicate *filter = + [NSPredicate predicateWithBlock:^BOOL(UIWindow *window, NSDictionary *bindings) { + return [window isKeyWindow]; + }]; + NSArray *windows = [[UIApplication sharedApplication] windows]; + UIWindow *keyWindow = [[windows filteredArrayUsingPredicate:filter] firstObject]; return keyWindow.safeAreaLayoutGuide.layoutFrame.size; } return self.screenSize; diff --git a/CriteoPublisherSdk/Sources/Context/CREmailHasher.m b/CriteoPublisherSdk/Sources/Context/CREmailHasher.m index 3af2db7be..a492b760e 100644 --- a/CriteoPublisherSdk/Sources/Context/CREmailHasher.m +++ b/CriteoPublisherSdk/Sources/Context/CREmailHasher.m @@ -28,7 +28,12 @@ + (NSString *)hash:(NSString *)email { NSData *data = [lowered dataUsingEncoding:NSUTF8StringEncoding]; NSMutableData *md5Data = [NSMutableData dataWithLength:CC_MD5_DIGEST_LENGTH]; + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" CC_MD5(data.bytes, (CC_LONG)data.length, md5Data.mutableBytes); +#pragma clang diagnostic pop + NSString *md5HexRepresentation = [CREmailHasher hexRepresentation:md5Data]; NSData *md5HexData = [md5HexRepresentation dataUsingEncoding:NSASCIIStringEncoding]; @@ -48,4 +53,4 @@ + (NSString *)hexRepresentation:(NSData *)data { return hexRepresentation; } -@end \ No newline at end of file +@end diff --git a/CriteoPublisherSdk/Sources/Info.plist b/CriteoPublisherSdk/Sources/Info.plist index 05e221814..4147d585d 100644 --- a/CriteoPublisherSdk/Sources/Info.plist +++ b/CriteoPublisherSdk/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 6.1.2 + 6.2.0 CFBundleVersion 1 diff --git a/CriteoPublisherSdk/Sources/Public/CRConstants.h b/CriteoPublisherSdk/Sources/Public/CRConstants.h index e0dc0e390..07a0b8a02 100644 --- a/CriteoPublisherSdk/Sources/Public/CRConstants.h +++ b/CriteoPublisherSdk/Sources/Public/CRConstants.h @@ -20,7 +20,7 @@ #ifndef CRConstants_h #define CRConstants_h -#define CRITEO_PUBLISHER_SDK_VERSION @"6.1.2" +#define CRITEO_PUBLISHER_SDK_VERSION @"6.2.0-rc1" #define CRITEO_DEFAULT_REQUEST_TIMEOUT_IN_SECONDS 60 #define CRITEO_DEFAULT_BID_TTL_IN_SECONDS 15 * 60 diff --git a/CriteoPublisherSdk/Tests/CriteoPublisherSdkTests-Info.plist b/CriteoPublisherSdk/Tests/CriteoPublisherSdkTests-Info.plist index f4017cbdf..2460f3b76 100644 --- a/CriteoPublisherSdk/Tests/CriteoPublisherSdkTests-Info.plist +++ b/CriteoPublisherSdk/Tests/CriteoPublisherSdkTests-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 6.1.2 + 6.2.0 CFBundleVersion 1 diff --git a/CriteoPublisherSdk/iTestHostApp/Info.plist b/CriteoPublisherSdk/iTestHostApp/Info.plist index 1d75d2d28..48e107a6a 100644 --- a/CriteoPublisherSdk/iTestHostApp/Info.plist +++ b/CriteoPublisherSdk/iTestHostApp/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 6.1.2 + 6.2.0 CFBundleVersion 1 LSRequiresIPhoneOS diff --git a/Podfile b/Podfile index 4ffd11be5..e7fbf688f 100644 --- a/Podfile +++ b/Podfile @@ -1,4 +1,4 @@ -platform :ios, '12.0' +platform :ios, '13.0' workspace 'CriteoPublisherSdk' @@ -8,7 +8,7 @@ end target 'CriteoPublisherSdkTests' do project 'CriteoPublisherSdk/CriteoPublisherSdk' - platform :ios, '12.0' + platform :ios, '13.0' # Test libs pod 'OCMock', '~> 3.6' @@ -21,7 +21,7 @@ end target 'CriteoAdViewer' do project 'CriteoAdViewer/CriteoAdViewer' - platform :ios, '12.0' + platform :ios, '13.0' pod 'Google-Mobile-Ads-SDK' pod 'Eureka' @@ -32,7 +32,7 @@ target 'CriteoGoogleAdapter' do # As declared in podspec, iOS 9 is supported # This is a workaround to address a CocoaPods v1.10 regression: # https://github.com/CocoaPods/CocoaPods/issues/10106 - platform :ios, '12.0' + platform :ios, '13.0' pod 'Google-Mobile-Ads-SDK' end diff --git a/Podfile.lock b/Podfile.lock index 529ac94a3..0f1301426 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,59 +1,15 @@ PODS: - - CriteoMRAID (1.0.1) + - CriteoMRAID (2.0.0) - Eureka (5.4.0) - FunctionalObjC (1.0.2) - - Google-Mobile-Ads-SDK (10.8.0): - - GoogleAppMeasurement (< 11.0, >= 7.0) + - Google-Mobile-Ads-SDK (11.5.0): - GoogleUserMessagingPlatform (>= 1.1) - - GoogleAppMeasurement (10.12.0): - - GoogleAppMeasurement/AdIdSupport (= 10.12.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - - GoogleUtilities/MethodSwizzler (~> 7.11) - - GoogleUtilities/Network (~> 7.11) - - "GoogleUtilities/NSData+zlib (~> 7.11)" - - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/AdIdSupport (10.12.0): - - GoogleAppMeasurement/WithoutAdIdSupport (= 10.12.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - - GoogleUtilities/MethodSwizzler (~> 7.11) - - GoogleUtilities/Network (~> 7.11) - - "GoogleUtilities/NSData+zlib (~> 7.11)" - - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/WithoutAdIdSupport (10.12.0): - - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - - GoogleUtilities/MethodSwizzler (~> 7.11) - - GoogleUtilities/Network (~> 7.11) - - "GoogleUtilities/NSData+zlib (~> 7.11)" - - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleUserMessagingPlatform (2.0.1) - - GoogleUtilities/AppDelegateSwizzler (7.11.4): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (7.11.4): - - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.11.4): - - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (7.11.4): - - GoogleUtilities/Logger - - GoogleUtilities/Network (7.11.4): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.11.4)" - - GoogleUtilities/Reachability (7.11.4): - - GoogleUtilities/Logger - - nanopb (2.30909.0): - - nanopb/decode (= 2.30909.0) - - nanopb/encode (= 2.30909.0) - - nanopb/decode (2.30909.0) - - nanopb/encode (2.30909.0) + - GoogleUserMessagingPlatform (2.4.0) - OCMock (3.9.1) - - PromisesObjC (2.3.1) - SwiftLint (0.45.1) DEPENDENCIES: - - CriteoMRAID (~> 1.0.1) + - CriteoMRAID (~> 2.0.0) - Eureka - FunctionalObjC (~> 1.0) - Google-Mobile-Ads-SDK @@ -66,27 +22,19 @@ SPEC REPOS: - Eureka - FunctionalObjC - Google-Mobile-Ads-SDK - - GoogleAppMeasurement - GoogleUserMessagingPlatform - - GoogleUtilities - - nanopb - OCMock - - PromisesObjC - SwiftLint SPEC CHECKSUMS: - CriteoMRAID: a037bee17b929a8bede8a07279e01a269cd85210 + CriteoMRAID: ed0541c7f49680a22fe4e704420c1436cbffe246 Eureka: fadaa9fa3d6e402d3c60f78f24edf3d7bafc9c29 FunctionalObjC: bd6aaa4b69abea0a5ac0e860a052c1ebebd5311c - Google-Mobile-Ads-SDK: 69daa7fb42061b425340706e382e87fab3e666a3 - GoogleAppMeasurement: 2d800fab85e7848b1e66a6f8ce5bca06c5aad892 - GoogleUserMessagingPlatform: 5f8b30daf181805317b6b985bb51c1ff3beca054 - GoogleUtilities: c63691989bf362ba0505507da00eeb326192e83e - nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 + Google-Mobile-Ads-SDK: 7db2098033ad3bfcd72a11e7503b49700a93029e + GoogleUserMessagingPlatform: f131fa7978d2ba88d7426702b057c2cc318e6595 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 - PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 SwiftLint: 06ac37e4d38c7068e0935bb30cda95f093bec761 -PODFILE CHECKSUM: 9c1567c5079d29487ac4dde74c7dd0ce58ab717b +PODFILE CHECKSUM: 54d5470e7c2ea1832d07f974b0cd229dd19fbf3e -COCOAPODS: 1.13.0 +COCOAPODS: 1.15.2