SASMediationRewardedVideoAdapterDelegate
Objective-C
@protocol SASMediationRewardedVideoAdapterDelegate <NSObject>
Swift
protocol SASMediationRewardedVideoAdapterDelegate : NSObjectProtocol
Protocol implemented by SASMediationRewardedVideoAdapter 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 an rewarded video ad has been loaded successfully.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapterDidLoad: (nonnull id<SASMediationRewardedVideoAdapter>)adapter;
Swift
func mediationRewardedVideoAdapterDidLoad(_ adapter: any SASMediationRewardedVideoAdapter)
Parameters
adapter
The mediation adapter.
-
Notify the Smart Display SDK that an rewarded video ad has failed to load.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapter: (nonnull id<SASMediationRewardedVideoAdapter>)adapter didFailToLoadWithError:(nonnull NSError *)error noFill:(BOOL)noFill;
Swift
func mediationRewardedVideoAdapter(_ adapter: any SASMediationRewardedVideoAdapter, 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 an rewarded video ad has been displayed successfully.
Warning
You must call this method as soon as your ad is shown, no impression will be logged on Smart side if you don’t.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapterDidShow: (nonnull id<SASMediationRewardedVideoAdapter>)adapter;
Swift
func mediationRewardedVideoAdapterDidShow(_ adapter: any SASMediationRewardedVideoAdapter)
Parameters
adapter
The mediation adapter.
-
Notify the Smart Display SDK that a rewarded video ad has failed to show.
Note
Since this error will always happen after a successfull loading, calling this delegate will simply forward the error to the app without attempting the loading of the next mediation ad.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapter: (nonnull id<SASMediationRewardedVideoAdapter>)adapter didFailToShowWithError:(nonnull NSError *)error;
Swift
func mediationRewardedVideoAdapter(_ adapter: any SASMediationRewardedVideoAdapter, didFailToShowWithError error: any Error)
Parameters
adapter
The mediation adapter.
error
The error returned by the mediation SDK.
-
Notify the Smart Display SDK that a rewarded video ad will present a modal view, for instance after a click.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapterWillPresentModalView: (nonnull id<SASMediationRewardedVideoAdapter>)adapter;
Swift
func mediationRewardedVideoAdapterWillPresentModalView(_ adapter: any SASMediationRewardedVideoAdapter)
Parameters
adapter
The mediation adapter.
-
Notify the Smart Display SDK that an rewarded video ad will dismiss a modal view, for instance a post click modal view that was open before.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapterWillDismissModalView: (nonnull id<SASMediationRewardedVideoAdapter>)adapter;
Swift
func mediationRewardedVideoAdapterWillDismissModalView(_ adapter: any SASMediationRewardedVideoAdapter)
Parameters
adapter
The mediation adapter.
-
Notify the Smart Display SDK that an interstitial has sent a click event.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapterDidReceiveAdClickedEvent: (nonnull id<SASMediationRewardedVideoAdapter>)adapter;
Swift
func mediationRewardedVideoAdapterDidReceiveAdClickedEvent(_ adapter: any SASMediationRewardedVideoAdapter)
Parameters
adapter
The mediation adapter.
-
Notify the Smart Display SDK that the currently displayed interstitial has been closed.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapterDidClose: (nonnull id<SASMediationRewardedVideoAdapter>)adapter;
Swift
func mediationRewardedVideoAdapterDidClose(_ adapter: any SASMediationRewardedVideoAdapter)
Parameters
adapter
The mediation adapter.
-
Notify the Smart Display SDK that the rewarded video has yield a reward.
This method can be called with an actual reward if provided by the third party SDK. It can also be called without reward: in this case, the reward set in the Smart insertion will be used.
Note
The reward will always be transfered to the app AFTER the rewarded video has been closed, no matter when you call this method.
Declaration
Objective-C
- (void)mediationRewardedVideoAdapter: (nonnull id<SASMediationRewardedVideoAdapter>)adapter didCollectReward:(nullable SASReward *)reward;
Swift
func mediationRewardedVideoAdapter(_ adapter: any SASMediationRewardedVideoAdapter, didCollect reward: SASReward?)
Parameters
adapter
The mediation adapter.
reward
The reward that has will be forwarded to the app, or nil to use the Smart server side reward instead.