Skip to content

Commit

Permalink
release 6.2.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliy-pavlenko committed Jul 12, 2024
1 parent f612612 commit 20fc522
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
20 changes: 10 additions & 10 deletions CriteoAdViewer/Sources/AdViewer/AdNetwork.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ private func googleMediationNetwork(_ controller: AdViewController) -> AdNetwork
AdFormat.interstitial
],
defaultAdUnits: [
AdFormat.banner320x50: "ca-app-pub-8459323526901202/5005871401",
AdFormat.banner300x250: "ca-app-pub-8459323526901202/5005871401",
AdFormat.interstitial: "ca-app-pub-8459323526901202/8006659012"
AdFormat.banner320x50: "ca-app-pub-3940256099942544/2934735716",
AdFormat.banner300x250: "ca-app-pub-3940256099942544/2934735716",
AdFormat.interstitial: "ca-app-pub-3940256099942544/4411468910"
],
specificAdUnits: [:],
adViewBuilder: GAMAdViewBuilder(controller: controller))
Expand All @@ -119,16 +119,16 @@ private func googleNetwork(_ controller: AdViewController) -> AdNetwork {
AdFormat.rewarded
],
defaultAdUnits: [
AdFormat.banner320x50: "/140800857/Endeavour_320x50",
AdFormat.banner300x250: "/140800857/Endeavour_300x250",
AdFormat.native: "/140800857/Endeavour_Native",
AdFormat.interstitial: "/140800857/Endeavour_Interstitial_320x480",
AdFormat.video: "/140800857/Endeavour_InterstitialVideo_320x480"
AdFormat.banner320x50: "/6499/example/banner",
AdFormat.banner300x250: "/6499/example/banner",
AdFormat.native: "/6499/example/native",
AdFormat.interstitial: "/6499/example/interstitial",
AdFormat.video: "/6499/example/interstitial"
],
specificAdUnits: [
AdFormat.rewarded: (
criteoId: "/140800857/Endeavour_RewardedVideo",
externalId: "/140800857/Endeavour_InterstitialVideo_320x480"
criteoId: "/6499/example/rewarded",
externalId: "/21775744923/example/rewarded_interstitial"
)
],
adViewBuilder: GoogleAdViewBuilder(controller: controller))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ public final class CRMRAIDURLHandler: MRAIDURLHandler {
private unowned var urlOpener: CRExternalURLOpener

private var topViewController: UIViewController? {
let keyWindow = UIApplication.shared.windows.first(where: { $0.isKeyWindow }) ?? UIApplication.shared.windows.first
let keyWindow = UIApplication
.shared
.connectedScenes
.compactMap { $0 as? UIWindowScene }
.flatMap { $0.windows }
.last { $0.isKeyWindow }
return keyWindow?.rootViewController
}

Expand Down
8 changes: 7 additions & 1 deletion CriteoPublisherSdk/Sources/MRAID/SwiftExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ extension UIView {
return false
}

let keyWindow = UIApplication.shared.windows.first(where: { $0.isKeyWindow }) ?? UIApplication.shared.windows.first
let keyWindow = UIApplication
.shared
.connectedScenes
.compactMap { $0 as? UIWindowScene }
.flatMap { $0.windows }
.last { $0.isKeyWindow }

guard let rootViewController = keyWindow?.rootViewController else {
return false
}
Expand Down

0 comments on commit 20fc522

Please sign in to comment.