From 1eba6dcdd78c333b3f3aebbcdb279daad81ddb65 Mon Sep 17 00:00:00 2001 From: Richard Depierre Date: Thu, 11 Apr 2024 10:51:11 +0200 Subject: [PATCH 1/6] Updated SampleApp: This is a quick example of the standalone integration --- Podfile | 8 ++-- Podfile.lock | 48 +++++++++---------- .../InReadDirectScrollViewController.swift | 17 +++---- 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/Podfile b/Podfile index 533c8bf0..e1ff7b1f 100644 --- a/Podfile +++ b/Podfile @@ -7,11 +7,11 @@ target 'TeadsSampleApp' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! - pod 'TeadsSDK', '~> 5.1' + pod 'TeadsSDK', '~> 5.1.2' - pod 'TeadsSASAdapter', '~> 5.1' - pod 'TeadsAdMobAdapter', '~> 5.1' - pod 'TeadsAppLovinAdapter', '~> 5.1' + pod 'TeadsSASAdapter', '~> 5.1.2' + pod 'TeadsAdMobAdapter', '~> 5.1.2' + pod 'TeadsAppLovinAdapter', '~> 5.1.2' pod 'SwiftFormat/CLI' end diff --git a/Podfile.lock b/Podfile.lock index 723fdd4b..4e451e81 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -3,21 +3,21 @@ PODS: - Google-Mobile-Ads-SDK (10.8.0): - GoogleAppMeasurement (< 11.0, >= 7.0) - GoogleUserMessagingPlatform (>= 1.1) - - GoogleAppMeasurement (10.23.1): - - GoogleAppMeasurement/AdIdSupport (= 10.23.1) + - GoogleAppMeasurement (10.24.0): + - GoogleAppMeasurement/AdIdSupport (= 10.24.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - GoogleUtilities/MethodSwizzler (~> 7.11) - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30911.0, >= 2.30908.0) - - GoogleAppMeasurement/AdIdSupport (10.23.1): - - GoogleAppMeasurement/WithoutAdIdSupport (= 10.23.1) + - GoogleAppMeasurement/AdIdSupport (10.24.0): + - GoogleAppMeasurement/WithoutAdIdSupport (= 10.24.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - GoogleUtilities/MethodSwizzler (~> 7.11) - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30911.0, >= 2.30908.0) - - GoogleAppMeasurement/WithoutAdIdSupport (10.23.1): + - GoogleAppMeasurement/WithoutAdIdSupport (10.24.0): - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - GoogleUtilities/MethodSwizzler (~> 7.11) - GoogleUtilities/Network (~> 7.11) @@ -59,25 +59,25 @@ PODS: - Smart-Display-SDK (7.18.0): - Smart-Core-SDK (~> 7.18) - SwiftFormat/CLI (0.50.1) - - TeadsAdMobAdapter (5.1.1): + - TeadsAdMobAdapter (5.1.2): - Google-Mobile-Ads-SDK (>= 9.0.0) - - TeadsSDK (= 5.1.1) - - TeadsAppLovinAdapter (5.1.1): + - TeadsSDK (= 5.1.2) + - TeadsAppLovinAdapter (5.1.2): - AppLovinSDK (>= 11.5.1) - - TeadsSDK (= 5.1.1) - - TeadsSASAdapter (5.1.1): + - TeadsSDK (= 5.1.2) + - TeadsSASAdapter (5.1.2): - Smart-Display-SDK (>= 7.6.2) - - TeadsSDK (= 5.1.1) - - TeadsSDK (5.1.1): - - TeadsSDK/Core (= 5.1.1) - - TeadsSDK/Core (5.1.1) + - TeadsSDK (= 5.1.2) + - TeadsSDK (5.1.2): + - TeadsSDK/Core (= 5.1.2) + - TeadsSDK/Core (5.1.2) DEPENDENCIES: - SwiftFormat/CLI - - TeadsAdMobAdapter (~> 5.1) - - TeadsAppLovinAdapter (~> 5.1) - - TeadsSASAdapter (~> 5.1) - - TeadsSDK (~> 5.1) + - TeadsAdMobAdapter (~> 5.1.2) + - TeadsAppLovinAdapter (~> 5.1.2) + - TeadsSASAdapter (~> 5.1.2) + - TeadsSDK (~> 5.1.2) SPEC REPOS: trunk: @@ -99,7 +99,7 @@ SPEC REPOS: SPEC CHECKSUMS: AppLovinSDK: 5c667a790725d9529c01c3f3acf12ab195865fbb Google-Mobile-Ads-SDK: 69daa7fb42061b425340706e382e87fab3e666a3 - GoogleAppMeasurement: 794d1d2f71fdf77a077a3986258a5c2dac0f9d48 + GoogleAppMeasurement: f3abf08495ef2cba7829f15318c373b8d9226491 GoogleUserMessagingPlatform: 5f8b30daf181805317b6b985bb51c1ff3beca054 GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152 nanopb: 438bc412db1928dac798aa6fd75726007be04262 @@ -107,11 +107,11 @@ SPEC CHECKSUMS: Smart-Core-SDK: 7f2b321a2f8a4233481db716a30a2715d2fafbd1 Smart-Display-SDK: 83450dd0befaa55f08779a8c67c30bd6d8e80ee9 SwiftFormat: e73212c71908404e333da34e303772b9e516ac9b - TeadsAdMobAdapter: 97c740bade7f433ec73372d0fe1c2e7bedaeeab4 - TeadsAppLovinAdapter: f44f998464a570cb7ae37b2e4cdf9134f797f8d2 - TeadsSASAdapter: 851149447b24293cbcb8c0f2ca93c8739ca6d969 - TeadsSDK: 70452f9e291c33fc148ef9eca8425c72b903fa16 + TeadsAdMobAdapter: ee85996c50697f1e8161b39ccf6869bfa8cc719d + TeadsAppLovinAdapter: 5b9e97b1f3f00b8879afd006b2688b810f89c888 + TeadsSASAdapter: 2c51148a09fa727849655ef40bb1d836f1164599 + TeadsSDK: 2a325eb7ee215db3b58df6ced5495ead2b3dfb8c -PODFILE CHECKSUM: 393b53fe773fe70c29dfb94ca995faa7d222f72d +PODFILE CHECKSUM: 638a8ade2e5537f7bb26e59df959b3cba02c3ee2 COCOAPODS: 1.15.2 diff --git a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift index 471c5b14..c9d273a7 100644 --- a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift +++ b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift @@ -14,19 +14,20 @@ class InReadDirectScrollViewController: TeadsViewController { @IBOutlet var teadsAdView: TeadsInReadAdView! @IBOutlet var teadsAdHeightConstraint: NSLayoutConstraint! var adRatio: TeadsAdRatio? - var placement: TeadsInReadAdPlacement? + var placement: TeadsPrebidAdPlacement? override func viewDidLoad() { super.viewDidLoad() - let pSettings = TeadsAdPlacementSettings { settings in - settings.enableDebug() + let adRequestSettings = TeadsAdRequestSettings { settings in + settings.addExtras("1", for: TeadsAdapterSettings.prebidStandaloneKey) } + let adPlacementSettings = TeadsAdPlacementSettings { settings in + settings.enableDebug() // remove in production + } + let prebidAdPlacement = Teads.createPrebidPlacement(settings: adPlacementSettings) + let renderersCollection = try? prebidAdPlacement?.getData(requestSettings: adRequestSettings) + print(renderersCollection) - // keep a strong reference to placement instance - placement = Teads.createInReadPlacement(pid: Int(pid) ?? 0, settings: pSettings, delegate: self) - placement?.requestAd(requestSettings: TeadsAdRequestSettings { settings in - settings.pageUrl("https://www.teads.com") - }) // We use an observer to know when a rotation happened, to resize the ad // You can use whatever way you want to do so NotificationCenter.default.addObserver(self, selector: #selector(rotationDetected), name: UIDevice.orientationDidChangeNotification, object: nil) From ae95fa31977bcc9f4f2bd61a6dab0fd09553d76a Mon Sep 17 00:00:00 2001 From: Richard Depierre Date: Thu, 11 Apr 2024 14:17:56 +0200 Subject: [PATCH 2/6] Updated SampleApp: This is a quick example of the standalone integration --- TeadsSampleApp.xcodeproj/project.pbxproj | 4 +++ .../InReadDirectScrollViewController.swift | 27 ++++++++++++------- .../Direct/ScrollView/PrebidAdResponse.swift | 17 ++++++++++++ 3 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 TeadsSampleApp/Controllers/InRead/Direct/ScrollView/PrebidAdResponse.swift diff --git a/TeadsSampleApp.xcodeproj/project.pbxproj b/TeadsSampleApp.xcodeproj/project.pbxproj index 8ad35007..23e0d68a 100644 --- a/TeadsSampleApp.xcodeproj/project.pbxproj +++ b/TeadsSampleApp.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 3C3CF0BD2BC80530002A20FA /* PrebidAdResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C3CF0BC2BC80530002A20FA /* PrebidAdResponse.swift */; }; 4079F243252CBE7F00B0AC31 /* ColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4079F242252CBE7F00B0AC31 /* ColorExtension.swift */; }; 4079F253252CC1EF00B0AC31 /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4079F252252CC1EF00B0AC31 /* RootViewController.swift */; }; 408A2D49253D995200CCFF44 /* RootButtonCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 408A2D46253D995200CCFF44 /* RootButtonCollectionViewCell.swift */; }; @@ -71,6 +72,7 @@ /* Begin PBXFileReference section */ 13915D12E3814B15B3832777 /* Pods_TeadsSampleApp.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TeadsSampleApp.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3C3CF0BC2BC80530002A20FA /* PrebidAdResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrebidAdResponse.swift; sourceTree = ""; }; 40077B422534AABF00D53197 /* InReadDirectCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InReadDirectCollectionViewController.swift; sourceTree = ""; }; 4079F242252CBE7F00B0AC31 /* ColorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorExtension.swift; sourceTree = ""; }; 4079F252252CC1EF00B0AC31 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = ""; }; @@ -219,6 +221,7 @@ isa = PBXGroup; children = ( B5555A4D1F7D3177007406D4 /* InReadDirectScrollViewController.swift */, + 3C3CF0BC2BC80530002A20FA /* PrebidAdResponse.swift */, ); path = ScrollView; sourceTree = ""; @@ -763,6 +766,7 @@ E954312827CD03E8005004B4 /* NativeAppLovinTableViewController.swift in Sources */, B5966D1E269D8FC6005CA2FF /* InReadAdmobScrollViewController.swift in Sources */, A956713829E95A3600505C29 /* NativeTagDirectTableViewController.swift in Sources */, + 3C3CF0BD2BC80530002A20FA /* PrebidAdResponse.swift in Sources */, E9A3AC582795AF2C00F124D6 /* AdOpportunityTrackerTableViewCell.swift in Sources */, B56A8ABB2698A0A20090A14A /* InReadDirectTableViewController.swift in Sources */, E9984EFA26B2D46F000D42D3 /* NativeTableViewCell.swift in Sources */, diff --git a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift index c9d273a7..3bbc353e 100644 --- a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift +++ b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift @@ -18,19 +18,28 @@ class InReadDirectScrollViewController: TeadsViewController { override func viewDidLoad() { super.viewDidLoad() - let adRequestSettings = TeadsAdRequestSettings { settings in - settings.addExtras("1", for: TeadsAdapterSettings.prebidStandaloneKey) - } + + // Create Prebid placement let adPlacementSettings = TeadsAdPlacementSettings { settings in settings.enableDebug() // remove in production } - let prebidAdPlacement = Teads.createPrebidPlacement(settings: adPlacementSettings) - let renderersCollection = try? prebidAdPlacement?.getData(requestSettings: adRequestSettings) - print(renderersCollection) + placement = Teads.createPrebidPlacement(settings: adPlacementSettings, delegate: self) + + // Get the ad request data + let adRequestSettings = TeadsAdRequestSettings { settings in + // Ensure to inform your article url or domain url for brand safety matters + settings.pageUrl("https://www.your.url.com") + + // Add this extra to enable your standalone integration + settings.addExtras("1", for: TeadsAdapterSettings.prebidStandaloneKey) + } + let teadsBidRequestExtraData = try? placement?.getData(requestSettings: adRequestSettings) + + // Prebid request with the getData + print(teadsBidRequestExtraData) - // We use an observer to know when a rotation happened, to resize the ad - // You can use whatever way you want to do so - NotificationCenter.default.addObserver(self, selector: #selector(rotationDetected), name: UIDevice.orientationDidChangeNotification, object: nil) + // Load ad + placement?.loadAd(adResponse: PrebidAdResponse.FAKE_WINNING_BID_RESPONSE, requestSettings: adRequestSettings) } deinit { diff --git a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/PrebidAdResponse.swift b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/PrebidAdResponse.swift new file mode 100644 index 00000000..68d2afc1 --- /dev/null +++ b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/PrebidAdResponse.swift @@ -0,0 +1,17 @@ +// +// PrebidAdResponse.swift +// TeadsSampleApp +// +// Created by Richard Dépierre on 11/04/2024. +// Copyright © 2024 Teads. All rights reserved. +// + +import Foundation + +enum PrebidAdResponse { + static let FAKE_VAST_CONTENT = "Brainient800:00:15" + + static let FAKE_ADM_CONTENT = "{\\\"ads\\\":[{\\\"settings\\\":{\\\"values\\\":{\\\"animations\\\":{\\\"expand\\\":0,\\\"collapse\\\":0.5},\\\"placementId\\\":84242,\\\"adType\\\":\\\"video\\\",\\\"placementFormat\\\":\\\"inread\\\",\\\"allowedPlayer\\\":\\\"any\\\",\\\"threshold\\\":50,\\\"pageId\\\":77781},\\\"components\\\":{\\\"closeButton\\\":{\\\"display\\\":false,\\\"countdown\\\":0},\\\"label\\\":{\\\"display\\\":true,\\\"text\\\":\\\"\\\"},\\\"credits\\\":{\\\"display\\\":false},\\\"soundButton\\\":{\\\"display\\\":true,\\\"countdown\\\":0,\\\"type\\\":\\\"equalizer\\\"},\\\"slider\\\":{\\\"closeButtonDisplay\\\":false}},\\\"behaviors\\\":{\\\"smartPosition\\\":{\\\"top\\\":false,\\\"corner\\\":false,\\\"mustBypassWhitelist\\\":true},\\\"slider\\\":{\\\"enable\\\":false},\\\"playerClick\\\":\\\"fullscreen\\\",\\\"soundStart\\\":{\\\"type\\\":\\\"mute\\\"},\\\"soundMute\\\":\\\"threshold\\\",\\\"soundOver\\\":\\\"over\\\",\\\"launch\\\":\\\"auto\\\",\\\"videoStart\\\":\\\"threshold\\\",\\\"videoPause\\\":\\\"threshold\\\",\\\"secure\\\":false,\\\"friendly\\\":false}},\\\"type\\\":\\\"VastXml\\\",\\\"content\\\":\\\"\(FAKE_VAST_CONTENT)\\\",\\\"connection_id\\\":460794,\\\"scenario_id\\\":18603,\\\"dsp_campaign_id\\\":\\\"590162\\\",\\\"ad_source_id\\\":200,\\\"dsp_creative_id\\\":\\\"625187\\\",\\\"insertion_id\\\":590162,\\\"placement_id\\\":84242,\\\"portfolio_item_id\\\":1,\\\"early_click_protection_duration\\\":0,\\\"exclusiveAdOnScreen\\\":false}],\\\"wigoEnabled\\\":false,\\\"placementMetadata\\\":{\\\"84242\\\":{\\\"auctionId\\\":\\\"a9995fbe-1cb5-4e1a-858f-266903d7d772\\\"}},\\\"viewerId\\\":\\\"b1aefcc416eb3116e70d52e5ac0618abcf6645f4\\\"}" + + static let FAKE_WINNING_BID_RESPONSE = "{\"id\":\"prebid-demo-response-video-outstream\",\"impid\":\"03ec3cdd-e144-40bd-98cc-1947235ce897\",\"price\":0.11701999999468729,\"nurl\":\"https://localhost:8080/prebid-server/win-notice?data=base64&clearingPrice=${1000}\",\"adm\":\"\(FAKE_ADM_CONTENT)\",\"adid\":\"test-ad-id-12345\",\"adomain\":[\"prebid.org\"],\"crid\":\"test-creative-id-1\",\"cid\":\"test-cid-1\",\"ext\":{\"prebid\":{\"type\":\"video\",\"targeting\":{\"hb_pb\":\"0.10\",\"hb_env\":\"mobile-app\",\"hb_size_prebid\":\"300x250\",\"hb_pb_prebid\":\"0.10\",\"hb_bidder_prebid\":\"prebid\",\"hb_size\":\"300x250\",\"hb_bidder\":\"prebid\",\"hb_env_prebid\":\"mobile-app\"},\"meta\":{\"renderername\":\"SampleRendererName\",\"rendererversion\":\"1.0\"}},\"origbidcpm\":0.11701999999468729,\"origbidcur\":\"USD\"}}" +} From b1e820ef72583fc4a9b44b769a8016d9c2e4e0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Bonaf=C3=A9?= Date: Thu, 19 Sep 2024 11:56:16 +0200 Subject: [PATCH 3/6] Add comment --- .../InReadDirectScrollViewController.swift | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift index 3bbc353e..df504190 100644 --- a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift +++ b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift @@ -24,7 +24,7 @@ class InReadDirectScrollViewController: TeadsViewController { settings.enableDebug() // remove in production } placement = Teads.createPrebidPlacement(settings: adPlacementSettings, delegate: self) - + // Get the ad request data let adRequestSettings = TeadsAdRequestSettings { settings in // Ensure to inform your article url or domain url for brand safety matters @@ -105,3 +105,20 @@ extension InReadDirectScrollViewController: TeadsAdDelegate { func didCollapsedFromFullscreen(ad _: TeadsAd) {} } + +enum PrebidAdResponse { + // Ad that will evoke resizing callbacks + static let FAKE_VAST_URL = "https://s8t.teads.tv/vast/a7165340-d714-11ee-9d18-8d6ab288a268" + + static let FAKE_VAST_CONTENT = "Brainient800:00:15" + + static let XML_TYPE = "VastXml" + static let URL_TYPE = "VastUrl" + + static let VAST_TYPE = URL_TYPE + static let VAST_CONTENT = FAKE_VAST_URL + + static let FAKE_ADM_CONTENT = "{\\\"ads\\\":[{\\\"settings\\\":{\\\"values\\\":{\\\"animations\\\":{\\\"expand\\\":0,\\\"collapse\\\":0.5},\\\"placementId\\\":84242,\\\"adType\\\":\\\"video\\\",\\\"placementFormat\\\":\\\"inread\\\",\\\"allowedPlayer\\\":\\\"any\\\",\\\"threshold\\\":50,\\\"pageId\\\":77781},\\\"components\\\":{\\\"closeButton\\\":{\\\"display\\\":false,\\\"countdown\\\":0},\\\"label\\\":{\\\"display\\\":true,\\\"text\\\":\\\"\\\"},\\\"credits\\\":{\\\"display\\\":false},\\\"soundButton\\\":{\\\"display\\\":true,\\\"countdown\\\":0,\\\"type\\\":\\\"equalizer\\\"},\\\"slider\\\":{\\\"closeButtonDisplay\\\":false}},\\\"behaviors\\\":{\\\"smartPosition\\\":{\\\"top\\\":false,\\\"corner\\\":false,\\\"mustBypassWhitelist\\\":true},\\\"slider\\\":{\\\"enable\\\":false},\\\"playerClick\\\":\\\"fullscreen\\\",\\\"soundStart\\\":{\\\"type\\\":\\\"mute\\\"},\\\"soundMute\\\":\\\"threshold\\\",\\\"soundOver\\\":\\\"over\\\",\\\"launch\\\":\\\"auto\\\",\\\"videoStart\\\":\\\"threshold\\\",\\\"videoPause\\\":\\\"threshold\\\",\\\"secure\\\":false,\\\"friendly\\\":false}},\\\"type\\\":\\\"\(VAST_TYPE)\\\",\\\"content\\\":\\\"\(VAST_CONTENT)\\\",\\\"connection_id\\\":460794,\\\"scenario_id\\\":18603,\\\"dsp_campaign_id\\\":\\\"590162\\\",\\\"ad_source_id\\\":200,\\\"dsp_creative_id\\\":\\\"625187\\\",\\\"insertion_id\\\":590162,\\\"placement_id\\\":84242,\\\"portfolio_item_id\\\":1,\\\"early_click_protection_duration\\\":0,\\\"exclusiveAdOnScreen\\\":false}],\\\"wigoEnabled\\\":false,\\\"placementMetadata\\\":{\\\"84242\\\":{\\\"auctionId\\\":\\\"a9995fbe-1cb5-4e1a-858f-266903d7d772\\\"}},\\\"viewerId\\\":\\\"b1aefcc416eb3116e70d52e5ac0618abcf6645f4\\\"}" + + static let FAKE_WINNING_BID_RESPONSE = "{\"id\":\"prebid-demo-response-video-outstream\",\"impid\":\"03ec3cdd-e144-40bd-98cc-1947235ce897\",\"price\":0.11701999999468729,\"nurl\":\"https://localhost:8080/prebid-server/win-notice?data=base64&clearingPrice=${1000}\",\"adm\":\"\(FAKE_ADM_CONTENT)\",\"adid\":\"test-ad-id-12345\",\"adomain\":[\"prebid.org\"],\"crid\":\"test-creative-id-1\",\"cid\":\"test-cid-1\",\"ext\":{\"prebid\":{\"type\":\"video\",\"targeting\":{\"hb_pb\":\"0.10\",\"hb_env\":\"mobile-app\",\"hb_size_prebid\":\"300x250\",\"hb_pb_prebid\":\"0.10\",\"hb_bidder_prebid\":\"prebid\",\"hb_size\":\"300x250\",\"hb_bidder\":\"prebid\",\"hb_env_prebid\":\"mobile-app\"},\"meta\":{\"renderername\":\"SampleRendererName\",\"rendererversion\":\"1.0\"}},\"origbidcpm\":0.11701999999468729,\"origbidcur\":\"USD\"}}" +} From 5b4e6ff484cc64ddeec1048e67675debb1dfc2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Bonaf=C3=A9?= Date: Thu, 19 Sep 2024 13:28:35 +0200 Subject: [PATCH 4/6] Fix escape sequences --- .../ScrollView/InReadDirectScrollViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift index df504190..1617e6d9 100644 --- a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift +++ b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift @@ -39,7 +39,7 @@ class InReadDirectScrollViewController: TeadsViewController { print(teadsBidRequestExtraData) // Load ad - placement?.loadAd(adResponse: PrebidAdResponse.FAKE_WINNING_BID_RESPONSE, requestSettings: adRequestSettings) + placement?.loadAd(adResponse: PrebidAdResponse.FAKE_TAMEDIA_ADM_RESPONSE, requestSettings: adRequestSettings) } deinit { @@ -109,7 +109,7 @@ extension InReadDirectScrollViewController: TeadsAdDelegate { enum PrebidAdResponse { // Ad that will evoke resizing callbacks static let FAKE_VAST_URL = "https://s8t.teads.tv/vast/a7165340-d714-11ee-9d18-8d6ab288a268" - + static let FAKE_VAST_CONTENT = "Brainient800:00:15" static let XML_TYPE = "VastXml" @@ -120,5 +120,7 @@ enum PrebidAdResponse { static let FAKE_ADM_CONTENT = "{\\\"ads\\\":[{\\\"settings\\\":{\\\"values\\\":{\\\"animations\\\":{\\\"expand\\\":0,\\\"collapse\\\":0.5},\\\"placementId\\\":84242,\\\"adType\\\":\\\"video\\\",\\\"placementFormat\\\":\\\"inread\\\",\\\"allowedPlayer\\\":\\\"any\\\",\\\"threshold\\\":50,\\\"pageId\\\":77781},\\\"components\\\":{\\\"closeButton\\\":{\\\"display\\\":false,\\\"countdown\\\":0},\\\"label\\\":{\\\"display\\\":true,\\\"text\\\":\\\"\\\"},\\\"credits\\\":{\\\"display\\\":false},\\\"soundButton\\\":{\\\"display\\\":true,\\\"countdown\\\":0,\\\"type\\\":\\\"equalizer\\\"},\\\"slider\\\":{\\\"closeButtonDisplay\\\":false}},\\\"behaviors\\\":{\\\"smartPosition\\\":{\\\"top\\\":false,\\\"corner\\\":false,\\\"mustBypassWhitelist\\\":true},\\\"slider\\\":{\\\"enable\\\":false},\\\"playerClick\\\":\\\"fullscreen\\\",\\\"soundStart\\\":{\\\"type\\\":\\\"mute\\\"},\\\"soundMute\\\":\\\"threshold\\\",\\\"soundOver\\\":\\\"over\\\",\\\"launch\\\":\\\"auto\\\",\\\"videoStart\\\":\\\"threshold\\\",\\\"videoPause\\\":\\\"threshold\\\",\\\"secure\\\":false,\\\"friendly\\\":false}},\\\"type\\\":\\\"\(VAST_TYPE)\\\",\\\"content\\\":\\\"\(VAST_CONTENT)\\\",\\\"connection_id\\\":460794,\\\"scenario_id\\\":18603,\\\"dsp_campaign_id\\\":\\\"590162\\\",\\\"ad_source_id\\\":200,\\\"dsp_creative_id\\\":\\\"625187\\\",\\\"insertion_id\\\":590162,\\\"placement_id\\\":84242,\\\"portfolio_item_id\\\":1,\\\"early_click_protection_duration\\\":0,\\\"exclusiveAdOnScreen\\\":false}],\\\"wigoEnabled\\\":false,\\\"placementMetadata\\\":{\\\"84242\\\":{\\\"auctionId\\\":\\\"a9995fbe-1cb5-4e1a-858f-266903d7d772\\\"}},\\\"viewerId\\\":\\\"b1aefcc416eb3116e70d52e5ac0618abcf6645f4\\\"}" + static let FAKE_TAMEDIA_ADM_RESPONSE = "{\"id\":\"58343531-5f75-4b9b-889a-2b069390bdc0\",\"impid\":\"2348926d-ba31-4fc3-a092-6b68f3daa264\",\"price\":5.14,\"nurl\":\"https://a.teads.tv/prebid-server/win-notice?data=CgQIuLwMEgQImvcHGgQIq5EBIgQI%2Bo8cKgQIq5EBMgQI%2Bo8cOgQI9bdCQgQIo5QmSggKBjYyNTE4N1IJCgcxMDg4NTAxWvkBCiYKJDAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMRK9AQq6AVJhdyhNb3ppbGxhLzUuMCAoTGludXg7IEFuZHJvaWQgOTsgQW5kcm9pZCBTREsgYnVpbHQgZm9yIGFybTY0IEJ1aWxkL1BTUjEuMjEwMzAxLjAwOS5CMTsgd3YpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIFZlcnNpb24vNC4wIENocm9tZS82Ni4wLjMzNTkuMTU4IE1vYmlsZSBTYWZhcmkvNTM3LjM2KRoPCg05MS4xMjYuMjE4LjI0YnIKcDIzNDg5MjZkLWJhMzEtNGZjMy1hMDkyLTZiNjhmM2RhYTI2NF9fMjM0ODkyNmQtYmEzMS00ZmMzLWEwOTItNmI2OGYzZGFhMjY0X19kNWNlYzQ1Yi05ZjFjLTQxODktYjRiMS0wNDEyYzNjODllYzJqCAoGMjA0MzQ0egsKCXNkay1pbmFwcIIBAggBkgFQCiQKIm9yZy5wcmViaWQubW9iaWxlLnJlbmRlcmluZ3Rlc3RhcHASHgocUHJlYmlkIFJlbmRlcmluZyBLb3RsaW4gRGVtbxoICgZnb29nbGWiAQUKA1VTRKoBIwoaChhjamExNW9HQ1J4dHYxdm90clR1bEZhRWkSBQoDVVNE&clearingPrice=5.14&clearingPriceCurr=CHF\",\"adm\":\"{\\\"ads\\\":[{\\\"settings\\\":{\\\"values\\\":{\\\"animations\\\":{\\\"expand\\\":0,\\\"collapse\\\":0.5},\\\"placementId\\\":84242,\\\"adType\\\":\\\"video\\\",\\\"placementFormat\\\":\\\"inread\\\",\\\"allowedPlayer\\\":\\\"any\\\",\\\"threshold\\\":50,\\\"pageId\\\":77781},\\\"components\\\":{\\\"closeButton\\\":{\\\"display\\\":false,\\\"countdown\\\":0},\\\"label\\\":{\\\"display\\\":true,\\\"text\\\":\\\"\\\"},\\\"credits\\\":{\\\"display\\\":false},\\\"soundButton\\\":{\\\"display\\\":true,\\\"countdown\\\":0,\\\"type\\\":\\\"equalizer\\\"},\\\"slider\\\":{\\\"closeButtonDisplay\\\":false}},\\\"behaviors\\\":{\\\"smartPosition\\\":{\\\"top\\\":false,\\\"corner\\\":false,\\\"mustBypassWhitelist\\\":true},\\\"slider\\\":{\\\"enable\\\":false},\\\"playerClick\\\":\\\"fullscreen\\\",\\\"soundStart\\\":{\\\"type\\\":\\\"mute\\\"},\\\"soundMute\\\":\\\"threshold\\\",\\\"soundOver\\\":\\\"over\\\",\\\"launch\\\":\\\"auto\\\",\\\"videoStart\\\":\\\"threshold\\\",\\\"videoPause\\\":\\\"threshold\\\",\\\"secure\\\":false,\\\"friendly\\\":false}},\\\"type\\\":\\\"VastUrl\\\",\\\"content\\\":\\\"https://s8t.teads.tv/vast/a7165340-d714-11ee-9d18-8d6ab288a268\\\",\\\"connection_id\\\":460794,\\\"scenario_id\\\":18603,\\\"dsp_campaign_id\\\":\\\"590162\\\",\\\"ad_source_id\\\":200,\\\"dsp_creative_id\\\":\\\"625187\\\",\\\"insertion_id\\\":590162,\\\"placement_id\\\":84242,\\\"portfolio_item_id\\\":1,\\\"early_click_protection_duration\\\":0,\\\"exclusiveAdOnScreen\\\":false}],\\\"wigoEnabled\\\":false,\\\"placementMetadata\\\":{\\\"84242\\\":{\\\"auctionId\\\":\\\"a9995fbe-1cb5-4e1a-858f-266903d7d772\\\"}},\\\"viewerId\\\":\\\"b1aefcc416eb3116e70d52e5ac0618abcf6645f4\\\"}\",\"adid\":\"625187\",\"adomain\":[\"teads.com\"],\"cid\":\"1088501\",\"crid\":\"625187\",\"cat\":[\"IAB12\"],\"ext\":{\"prebid\":{\"meta\":{\"rendererName\":\"teads\",\"rendererVersion\":\"1.0.0\",\"rendererData\":{\"resize\":true,\"sdkEngineVersion\":\"189\"}}}}}" + static let FAKE_WINNING_BID_RESPONSE = "{\"id\":\"prebid-demo-response-video-outstream\",\"impid\":\"03ec3cdd-e144-40bd-98cc-1947235ce897\",\"price\":0.11701999999468729,\"nurl\":\"https://localhost:8080/prebid-server/win-notice?data=base64&clearingPrice=${1000}\",\"adm\":\"\(FAKE_ADM_CONTENT)\",\"adid\":\"test-ad-id-12345\",\"adomain\":[\"prebid.org\"],\"crid\":\"test-creative-id-1\",\"cid\":\"test-cid-1\",\"ext\":{\"prebid\":{\"type\":\"video\",\"targeting\":{\"hb_pb\":\"0.10\",\"hb_env\":\"mobile-app\",\"hb_size_prebid\":\"300x250\",\"hb_pb_prebid\":\"0.10\",\"hb_bidder_prebid\":\"prebid\",\"hb_size\":\"300x250\",\"hb_bidder\":\"prebid\",\"hb_env_prebid\":\"mobile-app\"},\"meta\":{\"renderername\":\"SampleRendererName\",\"rendererversion\":\"1.0\"}},\"origbidcpm\":0.11701999999468729,\"origbidcur\":\"USD\"}}" } From d40491500f7404838f76bc1353a10d086e1afbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Bonaf=C3=A9?= Date: Thu, 19 Sep 2024 13:32:03 +0200 Subject: [PATCH 5/6] wip --- .../ScrollView/InReadDirectScrollViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift index 1617e6d9..331d3282 100644 --- a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift +++ b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/InReadDirectScrollViewController.swift @@ -39,7 +39,7 @@ class InReadDirectScrollViewController: TeadsViewController { print(teadsBidRequestExtraData) // Load ad - placement?.loadAd(adResponse: PrebidAdResponse.FAKE_TAMEDIA_ADM_RESPONSE, requestSettings: adRequestSettings) + placement?.loadAd(adResponse: PrebidAdResponse.TAMEDIA_FAKE_WINNING_BID_RESPONSE, requestSettings: adRequestSettings) } deinit { @@ -120,7 +120,7 @@ enum PrebidAdResponse { static let FAKE_ADM_CONTENT = "{\\\"ads\\\":[{\\\"settings\\\":{\\\"values\\\":{\\\"animations\\\":{\\\"expand\\\":0,\\\"collapse\\\":0.5},\\\"placementId\\\":84242,\\\"adType\\\":\\\"video\\\",\\\"placementFormat\\\":\\\"inread\\\",\\\"allowedPlayer\\\":\\\"any\\\",\\\"threshold\\\":50,\\\"pageId\\\":77781},\\\"components\\\":{\\\"closeButton\\\":{\\\"display\\\":false,\\\"countdown\\\":0},\\\"label\\\":{\\\"display\\\":true,\\\"text\\\":\\\"\\\"},\\\"credits\\\":{\\\"display\\\":false},\\\"soundButton\\\":{\\\"display\\\":true,\\\"countdown\\\":0,\\\"type\\\":\\\"equalizer\\\"},\\\"slider\\\":{\\\"closeButtonDisplay\\\":false}},\\\"behaviors\\\":{\\\"smartPosition\\\":{\\\"top\\\":false,\\\"corner\\\":false,\\\"mustBypassWhitelist\\\":true},\\\"slider\\\":{\\\"enable\\\":false},\\\"playerClick\\\":\\\"fullscreen\\\",\\\"soundStart\\\":{\\\"type\\\":\\\"mute\\\"},\\\"soundMute\\\":\\\"threshold\\\",\\\"soundOver\\\":\\\"over\\\",\\\"launch\\\":\\\"auto\\\",\\\"videoStart\\\":\\\"threshold\\\",\\\"videoPause\\\":\\\"threshold\\\",\\\"secure\\\":false,\\\"friendly\\\":false}},\\\"type\\\":\\\"\(VAST_TYPE)\\\",\\\"content\\\":\\\"\(VAST_CONTENT)\\\",\\\"connection_id\\\":460794,\\\"scenario_id\\\":18603,\\\"dsp_campaign_id\\\":\\\"590162\\\",\\\"ad_source_id\\\":200,\\\"dsp_creative_id\\\":\\\"625187\\\",\\\"insertion_id\\\":590162,\\\"placement_id\\\":84242,\\\"portfolio_item_id\\\":1,\\\"early_click_protection_duration\\\":0,\\\"exclusiveAdOnScreen\\\":false}],\\\"wigoEnabled\\\":false,\\\"placementMetadata\\\":{\\\"84242\\\":{\\\"auctionId\\\":\\\"a9995fbe-1cb5-4e1a-858f-266903d7d772\\\"}},\\\"viewerId\\\":\\\"b1aefcc416eb3116e70d52e5ac0618abcf6645f4\\\"}" - static let FAKE_TAMEDIA_ADM_RESPONSE = "{\"id\":\"58343531-5f75-4b9b-889a-2b069390bdc0\",\"impid\":\"2348926d-ba31-4fc3-a092-6b68f3daa264\",\"price\":5.14,\"nurl\":\"https://a.teads.tv/prebid-server/win-notice?data=CgQIuLwMEgQImvcHGgQIq5EBIgQI%2Bo8cKgQIq5EBMgQI%2Bo8cOgQI9bdCQgQIo5QmSggKBjYyNTE4N1IJCgcxMDg4NTAxWvkBCiYKJDAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMRK9AQq6AVJhdyhNb3ppbGxhLzUuMCAoTGludXg7IEFuZHJvaWQgOTsgQW5kcm9pZCBTREsgYnVpbHQgZm9yIGFybTY0IEJ1aWxkL1BTUjEuMjEwMzAxLjAwOS5CMTsgd3YpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIFZlcnNpb24vNC4wIENocm9tZS82Ni4wLjMzNTkuMTU4IE1vYmlsZSBTYWZhcmkvNTM3LjM2KRoPCg05MS4xMjYuMjE4LjI0YnIKcDIzNDg5MjZkLWJhMzEtNGZjMy1hMDkyLTZiNjhmM2RhYTI2NF9fMjM0ODkyNmQtYmEzMS00ZmMzLWEwOTItNmI2OGYzZGFhMjY0X19kNWNlYzQ1Yi05ZjFjLTQxODktYjRiMS0wNDEyYzNjODllYzJqCAoGMjA0MzQ0egsKCXNkay1pbmFwcIIBAggBkgFQCiQKIm9yZy5wcmViaWQubW9iaWxlLnJlbmRlcmluZ3Rlc3RhcHASHgocUHJlYmlkIFJlbmRlcmluZyBLb3RsaW4gRGVtbxoICgZnb29nbGWiAQUKA1VTRKoBIwoaChhjamExNW9HQ1J4dHYxdm90clR1bEZhRWkSBQoDVVNE&clearingPrice=5.14&clearingPriceCurr=CHF\",\"adm\":\"{\\\"ads\\\":[{\\\"settings\\\":{\\\"values\\\":{\\\"animations\\\":{\\\"expand\\\":0,\\\"collapse\\\":0.5},\\\"placementId\\\":84242,\\\"adType\\\":\\\"video\\\",\\\"placementFormat\\\":\\\"inread\\\",\\\"allowedPlayer\\\":\\\"any\\\",\\\"threshold\\\":50,\\\"pageId\\\":77781},\\\"components\\\":{\\\"closeButton\\\":{\\\"display\\\":false,\\\"countdown\\\":0},\\\"label\\\":{\\\"display\\\":true,\\\"text\\\":\\\"\\\"},\\\"credits\\\":{\\\"display\\\":false},\\\"soundButton\\\":{\\\"display\\\":true,\\\"countdown\\\":0,\\\"type\\\":\\\"equalizer\\\"},\\\"slider\\\":{\\\"closeButtonDisplay\\\":false}},\\\"behaviors\\\":{\\\"smartPosition\\\":{\\\"top\\\":false,\\\"corner\\\":false,\\\"mustBypassWhitelist\\\":true},\\\"slider\\\":{\\\"enable\\\":false},\\\"playerClick\\\":\\\"fullscreen\\\",\\\"soundStart\\\":{\\\"type\\\":\\\"mute\\\"},\\\"soundMute\\\":\\\"threshold\\\",\\\"soundOver\\\":\\\"over\\\",\\\"launch\\\":\\\"auto\\\",\\\"videoStart\\\":\\\"threshold\\\",\\\"videoPause\\\":\\\"threshold\\\",\\\"secure\\\":false,\\\"friendly\\\":false}},\\\"type\\\":\\\"VastUrl\\\",\\\"content\\\":\\\"https://s8t.teads.tv/vast/a7165340-d714-11ee-9d18-8d6ab288a268\\\",\\\"connection_id\\\":460794,\\\"scenario_id\\\":18603,\\\"dsp_campaign_id\\\":\\\"590162\\\",\\\"ad_source_id\\\":200,\\\"dsp_creative_id\\\":\\\"625187\\\",\\\"insertion_id\\\":590162,\\\"placement_id\\\":84242,\\\"portfolio_item_id\\\":1,\\\"early_click_protection_duration\\\":0,\\\"exclusiveAdOnScreen\\\":false}],\\\"wigoEnabled\\\":false,\\\"placementMetadata\\\":{\\\"84242\\\":{\\\"auctionId\\\":\\\"a9995fbe-1cb5-4e1a-858f-266903d7d772\\\"}},\\\"viewerId\\\":\\\"b1aefcc416eb3116e70d52e5ac0618abcf6645f4\\\"}\",\"adid\":\"625187\",\"adomain\":[\"teads.com\"],\"cid\":\"1088501\",\"crid\":\"625187\",\"cat\":[\"IAB12\"],\"ext\":{\"prebid\":{\"meta\":{\"rendererName\":\"teads\",\"rendererVersion\":\"1.0.0\",\"rendererData\":{\"resize\":true,\"sdkEngineVersion\":\"189\"}}}}}" - static let FAKE_WINNING_BID_RESPONSE = "{\"id\":\"prebid-demo-response-video-outstream\",\"impid\":\"03ec3cdd-e144-40bd-98cc-1947235ce897\",\"price\":0.11701999999468729,\"nurl\":\"https://localhost:8080/prebid-server/win-notice?data=base64&clearingPrice=${1000}\",\"adm\":\"\(FAKE_ADM_CONTENT)\",\"adid\":\"test-ad-id-12345\",\"adomain\":[\"prebid.org\"],\"crid\":\"test-creative-id-1\",\"cid\":\"test-cid-1\",\"ext\":{\"prebid\":{\"type\":\"video\",\"targeting\":{\"hb_pb\":\"0.10\",\"hb_env\":\"mobile-app\",\"hb_size_prebid\":\"300x250\",\"hb_pb_prebid\":\"0.10\",\"hb_bidder_prebid\":\"prebid\",\"hb_size\":\"300x250\",\"hb_bidder\":\"prebid\",\"hb_env_prebid\":\"mobile-app\"},\"meta\":{\"renderername\":\"SampleRendererName\",\"rendererversion\":\"1.0\"}},\"origbidcpm\":0.11701999999468729,\"origbidcur\":\"USD\"}}" + + static let TAMEDIA_FAKE_WINNING_BID_RESPONSE = "{\"id\":\"58343531-5f75-4b9b-889a-2b069390bdc0\",\"impid\":\"2348926d-ba31-4fc3-a092-6b68f3daa264\",\"price\":5.14,\"nurl\":\"https://a.teads.tv/prebid-server/win-notice?data=CgQIuLwMEgQImvcHGgQIq5EBIgQI%2Bo8cKgQIq5EBMgQI%2Bo8cOgQI9bdCQgQIo5QmSggKBjYyNTE4N1IJCgcxMDg4NTAxWvkBCiYKJDAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMRK9AQq6AVJhdyhNb3ppbGxhLzUuMCAoTGludXg7IEFuZHJvaWQgOTsgQW5kcm9pZCBTREsgYnVpbHQgZm9yIGFybTY0IEJ1aWxkL1BTUjEuMjEwMzAxLjAwOS5CMTsgd3YpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIFZlcnNpb24vNC4wIENocm9tZS82Ni4wLjMzNTkuMTU4IE1vYmlsZSBTYWZhcmkvNTM3LjM2KRoPCg05MS4xMjYuMjE4LjI0YnIKcDIzNDg5MjZkLWJhMzEtNGZjMy1hMDkyLTZiNjhmM2RhYTI2NF9fMjM0ODkyNmQtYmEzMS00ZmMzLWEwOTItNmI2OGYzZGFhMjY0X19kNWNlYzQ1Yi05ZjFjLTQxODktYjRiMS0wNDEyYzNjODllYzJqCAoGMjA0MzQ0egsKCXNkay1pbmFwcIIBAggBkgFQCiQKIm9yZy5wcmViaWQubW9iaWxlLnJlbmRlcmluZ3Rlc3RhcHASHgocUHJlYmlkIFJlbmRlcmluZyBLb3RsaW4gRGVtbxoICgZnb29nbGWiAQUKA1VTRKoBIwoaChhjamExNW9HQ1J4dHYxdm90clR1bEZhRWkSBQoDVVNE&clearingPrice=5.14&clearingPriceCurr=CHF\",\"adm\":\"{\\\"ads\\\":[{\\\"settings\\\":{\\\"values\\\":{\\\"animations\\\":{\\\"expand\\\":0,\\\"collapse\\\":0.5},\\\"placementId\\\":84242,\\\"adType\\\":\\\"video\\\",\\\"placementFormat\\\":\\\"inread\\\",\\\"allowedPlayer\\\":\\\"any\\\",\\\"threshold\\\":50,\\\"pageId\\\":77781},\\\"components\\\":{\\\"closeButton\\\":{\\\"display\\\":false,\\\"countdown\\\":0},\\\"label\\\":{\\\"display\\\":true,\\\"text\\\":\\\"\\\"},\\\"credits\\\":{\\\"display\\\":false},\\\"soundButton\\\":{\\\"display\\\":true,\\\"countdown\\\":0,\\\"type\\\":\\\"equalizer\\\"},\\\"slider\\\":{\\\"closeButtonDisplay\\\":false}},\\\"behaviors\\\":{\\\"smartPosition\\\":{\\\"top\\\":false,\\\"corner\\\":false,\\\"mustBypassWhitelist\\\":true},\\\"slider\\\":{\\\"enable\\\":false},\\\"playerClick\\\":\\\"fullscreen\\\",\\\"soundStart\\\":{\\\"type\\\":\\\"mute\\\"},\\\"soundMute\\\":\\\"threshold\\\",\\\"soundOver\\\":\\\"over\\\",\\\"launch\\\":\\\"auto\\\",\\\"videoStart\\\":\\\"threshold\\\",\\\"videoPause\\\":\\\"threshold\\\",\\\"secure\\\":false,\\\"friendly\\\":false}},\\\"type\\\":\\\"VastUrl\\\",\\\"content\\\":\\\"https://s8t.teads.tv/vast/a7165340-d714-11ee-9d18-8d6ab288a268\\\",\\\"connection_id\\\":460794,\\\"scenario_id\\\":18603,\\\"dsp_campaign_id\\\":\\\"590162\\\",\\\"ad_source_id\\\":200,\\\"dsp_creative_id\\\":\\\"625187\\\",\\\"insertion_id\\\":590162,\\\"placement_id\\\":84242,\\\"portfolio_item_id\\\":1,\\\"early_click_protection_duration\\\":0,\\\"exclusiveAdOnScreen\\\":false}],\\\"wigoEnabled\\\":false,\\\"placementMetadata\\\":{\\\"84242\\\":{\\\"auctionId\\\":\\\"a9995fbe-1cb5-4e1a-858f-266903d7d772\\\"}},\\\"viewerId\\\":\\\"b1aefcc416eb3116e70d52e5ac0618abcf6645f4\\\"}\",\"adid\":\"625187\",\"adomain\":[\"teads.com\"],\"cid\":\"1088501\",\"crid\":\"625187\",\"cat\":[\"IAB12\"],\"ext\":{\"prebid\":{\"meta\":{\"rendererName\":\"teads\",\"rendererVersion\":\"1.0.0\",\"rendererData\":{\"resize\":true,\"sdkEngineVersion\":\"189\"}}}}}" } From 87a0666292b94d03c6c7167b5c597fe50e6b6637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Bonaf=C3=A9?= Date: Thu, 19 Sep 2024 13:36:08 +0200 Subject: [PATCH 6/6] Remove enum --- .../Direct/ScrollView/PrebidAdResponse.swift | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 TeadsSampleApp/Controllers/InRead/Direct/ScrollView/PrebidAdResponse.swift diff --git a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/PrebidAdResponse.swift b/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/PrebidAdResponse.swift deleted file mode 100644 index 68d2afc1..00000000 --- a/TeadsSampleApp/Controllers/InRead/Direct/ScrollView/PrebidAdResponse.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// PrebidAdResponse.swift -// TeadsSampleApp -// -// Created by Richard Dépierre on 11/04/2024. -// Copyright © 2024 Teads. All rights reserved. -// - -import Foundation - -enum PrebidAdResponse { - static let FAKE_VAST_CONTENT = "Brainient800:00:15" - - static let FAKE_ADM_CONTENT = "{\\\"ads\\\":[{\\\"settings\\\":{\\\"values\\\":{\\\"animations\\\":{\\\"expand\\\":0,\\\"collapse\\\":0.5},\\\"placementId\\\":84242,\\\"adType\\\":\\\"video\\\",\\\"placementFormat\\\":\\\"inread\\\",\\\"allowedPlayer\\\":\\\"any\\\",\\\"threshold\\\":50,\\\"pageId\\\":77781},\\\"components\\\":{\\\"closeButton\\\":{\\\"display\\\":false,\\\"countdown\\\":0},\\\"label\\\":{\\\"display\\\":true,\\\"text\\\":\\\"\\\"},\\\"credits\\\":{\\\"display\\\":false},\\\"soundButton\\\":{\\\"display\\\":true,\\\"countdown\\\":0,\\\"type\\\":\\\"equalizer\\\"},\\\"slider\\\":{\\\"closeButtonDisplay\\\":false}},\\\"behaviors\\\":{\\\"smartPosition\\\":{\\\"top\\\":false,\\\"corner\\\":false,\\\"mustBypassWhitelist\\\":true},\\\"slider\\\":{\\\"enable\\\":false},\\\"playerClick\\\":\\\"fullscreen\\\",\\\"soundStart\\\":{\\\"type\\\":\\\"mute\\\"},\\\"soundMute\\\":\\\"threshold\\\",\\\"soundOver\\\":\\\"over\\\",\\\"launch\\\":\\\"auto\\\",\\\"videoStart\\\":\\\"threshold\\\",\\\"videoPause\\\":\\\"threshold\\\",\\\"secure\\\":false,\\\"friendly\\\":false}},\\\"type\\\":\\\"VastXml\\\",\\\"content\\\":\\\"\(FAKE_VAST_CONTENT)\\\",\\\"connection_id\\\":460794,\\\"scenario_id\\\":18603,\\\"dsp_campaign_id\\\":\\\"590162\\\",\\\"ad_source_id\\\":200,\\\"dsp_creative_id\\\":\\\"625187\\\",\\\"insertion_id\\\":590162,\\\"placement_id\\\":84242,\\\"portfolio_item_id\\\":1,\\\"early_click_protection_duration\\\":0,\\\"exclusiveAdOnScreen\\\":false}],\\\"wigoEnabled\\\":false,\\\"placementMetadata\\\":{\\\"84242\\\":{\\\"auctionId\\\":\\\"a9995fbe-1cb5-4e1a-858f-266903d7d772\\\"}},\\\"viewerId\\\":\\\"b1aefcc416eb3116e70d52e5ac0618abcf6645f4\\\"}" - - static let FAKE_WINNING_BID_RESPONSE = "{\"id\":\"prebid-demo-response-video-outstream\",\"impid\":\"03ec3cdd-e144-40bd-98cc-1947235ce897\",\"price\":0.11701999999468729,\"nurl\":\"https://localhost:8080/prebid-server/win-notice?data=base64&clearingPrice=${1000}\",\"adm\":\"\(FAKE_ADM_CONTENT)\",\"adid\":\"test-ad-id-12345\",\"adomain\":[\"prebid.org\"],\"crid\":\"test-creative-id-1\",\"cid\":\"test-cid-1\",\"ext\":{\"prebid\":{\"type\":\"video\",\"targeting\":{\"hb_pb\":\"0.10\",\"hb_env\":\"mobile-app\",\"hb_size_prebid\":\"300x250\",\"hb_pb_prebid\":\"0.10\",\"hb_bidder_prebid\":\"prebid\",\"hb_size\":\"300x250\",\"hb_bidder\":\"prebid\",\"hb_env_prebid\":\"mobile-app\"},\"meta\":{\"renderername\":\"SampleRendererName\",\"rendererversion\":\"1.0\"}},\"origbidcpm\":0.11701999999468729,\"origbidcur\":\"USD\"}}" -}