Skip to content

Commit

Permalink
Ios sample app adjusts + interstitial end card (#23)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
brugg authored Jun 23, 2021
1 parent 6090879 commit cf48356
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions package/Runtime/Plugins/iOS/NimbusManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions sample-app/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -166,6 +166,7 @@ PlayerSettings:
tvOS: com.DefaultCompany.com.unity.template.mobile2D
buildNumber:
Standalone: 0
iOS: 1
iPhone: 0
tvOS: 0
AndroidBundleVersionCode: 1
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cf48356

Please sign in to comment.