prebid / prebid-mobile-ios

Prebid Mobile SDK for iOS applications
Apache License 2.0
47 stars 89 forks source link

GAMBannerEventHandler is not available #940

Closed korre closed 4 months ago

korre commented 10 months ago

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 commented 10 months ago

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?

jsligh commented 4 months ago

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