SASMediationNativeAdAdapterDelegate
Objective-C
@protocol SASMediationNativeAdAdapterDelegate <NSObject>
Swift
protocol SASMediationNativeAdAdapterDelegate : NSObjectProtocol
Protocol implemented by SASMediationNativeAdAdapter delegate.
Use this protocol to provide information about the ad loading status or events to the Smart Display SDK.
-
Notify the Smart Display SDK that a native ad has been loaded successfully.
When a native ad is fetched using a third party SDK, you must convert it into a SASMediationNativeAdInfo object so the Smart SDK is able to use it.
Declaration
Objective-C
- (void)mediationNativeAdAdapter: (nonnull id<SASMediationNativeAdAdapter>)adapter didLoadAdInfo:(nonnull SASMediationNativeAdInfo *)adInfo;
Swift
func mediationNativeAdAdapter(_ adapter: any SASMediationNativeAdAdapter, didLoad adInfo: SASMediationNativeAdInfo)
Parameters
adapter
The mediation adapter.
adInfo
An instance of SASMediationNativeAdInfo that will hold native ad information retrieved from the third party SDK.
-
Notify the Smart Display SDK that the native ad has failed to load.
Declaration
Objective-C
- (void)mediationNativeAdAdapter: (nonnull id<SASMediationNativeAdAdapter>)adapter didFailToLoadWithError:(nonnull NSError *)error noFill:(BOOL)noFill;
Swift
func mediationNativeAdAdapter(_ adapter: any SASMediationNativeAdAdapter, didFailToLoadWithError error: any Error, noFill: Bool)
Parameters
adapter
The mediation adapter.
error
The error returned by the mediation SDK.
noFill
YES if the error is a ‘no fill’, NO in all other cases (network error, wrong placement, …). If you are unsure, send YES.
-
Notify the Smart Display SDK that a native ad has sent a click event.
Declaration
Objective-C
- (void)mediationNativeAdAdapterDidReceiveAdClickedEvent: (nonnull id<SASMediationNativeAdAdapter>)adapter;
Swift
func mediationNativeAdAdapterDidReceiveAdClickedEvent(_ adapter: any SASMediationNativeAdAdapter)
Parameters
adapter
The mediation adapter.