From cf48356e9ea3bb7f91f879a7aeb945fe00eecc0d Mon Sep 17 00:00:00 2001 From: Bruno Bruggemann Date: Wed, 23 Jun 2021 17:14:15 -0300 Subject: [PATCH] Ios sample app adjusts + interstitial end card (#23) * Added an image to be show in testflight * Added logic to present the end card for interstitial ads. * Increased iOS sample app version and build number --- package/Runtime/Plugins/iOS/NimbusManager.swift | 11 +++++++++++ sample-app/ProjectSettings/ProjectSettings.asset | 6 ++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/package/Runtime/Plugins/iOS/NimbusManager.swift b/package/Runtime/Plugins/iOS/NimbusManager.swift index 17743ec5..7ea8cf6f 100644 --- a/package/Runtime/Plugins/iOS/NimbusManager.swift +++ b/package/Runtime/Plugins/iOS/NimbusManager.swift @@ -95,6 +95,17 @@ import NimbusKit request.impressions[0].banner?.bidFloor = bannerFloor request.impressions[0].video?.bidFloor = videoFloor + let adFormat = UIDevice.current.orientation.isLandscape ? NimbusAdFormat.interstitialLandscape : NimbusAdFormat.interstitialPortrait + let banner = NimbusBanner( + width: adFormat.width, + height: adFormat.height, + companionAdRenderMode: .endCard + ) + + // Forces the request to show the end card + var impression = request.impressions[0] + impression.video?.companionAds = [banner] + request.impressions[0] = impression (Nimbus.shared.renderers[.forAuctionType(.video)] as? NimbusVideoAdRenderer)?.showMuteButton = false // false by default diff --git a/sample-app/ProjectSettings/ProjectSettings.asset b/sample-app/ProjectSettings/ProjectSettings.asset index 509f58e8..e1cad8a7 100644 --- a/sample-app/ProjectSettings/ProjectSettings.asset +++ b/sample-app/ProjectSettings/ProjectSettings.asset @@ -121,7 +121,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 0.0.1 + bundleVersion: 0.0.2 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -166,6 +166,7 @@ PlayerSettings: tvOS: com.DefaultCompany.com.unity.template.mobile2D buildNumber: Standalone: 0 + iOS: 1 iPhone: 0 tvOS: 0 AndroidBundleVersionCode: 1 @@ -471,7 +472,8 @@ PlayerSettings: m_Height: 20 m_Kind: 2 m_SubKind: iPad - - m_Textures: [] + - m_Textures: + - {fileID: 2800000, guid: b617d10ccc6944ef8bcfc9481c46d89c, type: 3} m_Width: 1024 m_Height: 1024 m_Kind: 4