Skip to content

Commit

Permalink
Use native delegate to notify appLovin of early failures to load ads (#…
Browse files Browse the repository at this point in the history
…873)

Co-authored-by: Jakub Matula <[email protected]>
  • Loading branch information
kubamatula and Jakub Matula authored Jun 23, 2023
1 parent bc79b69 commit 93d2f4c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ extension PrebidMAXMediationAdapter: MANativeAdAdapter, NativeAdEventDelegate {

guard let serverParameter = parameters.serverParameters[MAXCustomParametersKey] as? [String: String] else {
let error = MAAdapterError(nsError: MAXAdaptersError.noServerParameter)
bannerDelegate?.didFailToLoadAdViewAdWithError(error)
nativeDelegate?.didFailToLoadNativeAdWithError(error)
return
}

guard let targetingInfo = parameters.localExtraParameters[PBMMediationTargetingInfoKey] as? [String: String] else {
let error = MAAdapterError(nsError: MAXAdaptersError.noTargetingInfoInBid)
bannerDelegate?.didFailToLoadAdViewAdWithError(error)
nativeDelegate?.didFailToLoadNativeAdWithError(error)
return
}

guard MediationUtils.isServerParameterDictInTargetingInfoDict(serverParameter, targetingInfo) else {
let error = MAAdapterError(nsError: MAXAdaptersError.wrongServerParameter)
bannerDelegate?.didFailToLoadAdViewAdWithError(error)
nativeDelegate?.didFailToLoadNativeAdWithError(error)
return
}

Expand Down

0 comments on commit 93d2f4c

Please sign in to comment.