prebid-mobile-ios icon indicating copy to clipboard operation
prebid-mobile-ios copied to clipboard

GAMBannerEventHandler is not available

Open korre opened this issue 1 year ago • 1 comments

Trying to implement Prebid for iOS using GAM Rendering integrations following this guide for Banner: https://docs.prebid.org/prebid-mobile/modules/rendering/ios-sdk-integration-gam.html

// 1. Create an Event Handler
let eventHandler = GAMBannerEventHandler(adUnitID: GAM_AD_UNIT_ID,
                                         validGADAdSizes: [NSValueFromGADAdSize(adSize)])
       
// 2. Create a Banner View
let banner = BannerView(configID: CONFIG_ID,
                        eventHandler: eventHandler)

banner.delegate = self

addBannerToUI(banner: banner)
        
// 3. Load an Ad
banner.loadAd()

Im stuck on "GAMBannerEventHandler". This class is nowhere to be found..

I have installed these pods:

  pod 'PrebidMobile', '~> 2.1.6'
  pod 'PrebidMobileAdMobAdapters', '~> 2.1.6'

I've also googled and searched but the class is non existent so how can I proceed here?

korre avatar Nov 30 '23 12:11 korre

I finally found some code examples where I could see an missing import which is not mentioned in the example code.

https://github.com/prebid/prebid-mobile-ios/blob/master/Example/PrebidDemo/PrebidDemoSwift/Examples/GAM/RenderingAPI/GAMDisplayBannerViewController.swift

pod 'PrebidMobileGAMEventHandlers', '~> 2.1.6'

Maybe this is something to add to the docs?

korre avatar Nov 30 '23 12:11 korre

Being addressed here: https://github.com/prebid/prebid.github.io/pull/5385

jsligh avatar Jun 03 '24 17:06 jsligh