SASMediationRewardedVideoAdapter

Objective-C

@protocol SASMediationRewardedVideoAdapter <NSObject>

Swift

protocol SASMediationRewardedVideoAdapter : NSObjectProtocol

Protocol that must be implemented by mediation adapters that load and return rewarded video ads.

  • Initialize a new instance of the rewarded video adapter with an adapter delegate.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDelegate:
        (nonnull id<SASMediationRewardedVideoAdapterDelegate>)delegate;

    Parameters

    delegate

    An instance of the delegate you will use to provide information to Smart Display SDK.

    Return Value

    An initialized instance of the rewarded video adapter.

  • Requests a mediated rewarded video ad asynchronously.

    Use the delegate provided in the init method to inform the Smart Display SDK about the loading status of the ad.

    Declaration

    Objective-C

    - (void)requestRewardedVideoWithServerParameterString:
                (nonnull NSString *)serverParameterString
                                         clientParameters:(nonnull NSDictionary *)
                                                              clientParameters;

    Swift

    func requestRewardedVideo(withServerParameterString serverParameterString: String, clientParameters: [AnyHashable : Any])

    Parameters

    serverParameterString

    A string containing all needed parameters (as returned by Smart ad delivery) to make the mediation ad call.

    clientParameters

    Additional client-side parameters (see SASMediationAdapterConstants.h for an exhaustive list).

  • Requests the adapter to show the currently loaded rewarded video.

    Declaration

    Objective-C

    - (void)showRewardedVideoFromViewController:
        (nonnull UIViewController *)viewController;

    Swift

    func showRewardedVideo(fromViewController viewController: Any!)

    Parameters

    viewController

    The view controller the rewarded video will be displayed into.

  • Return whether the rewarded video is ready to be displayed or not.

    Declaration

    Objective-C

    - (BOOL)isRewardedVideoReady;

    Swift

    func isRewardedVideoReady() -> Bool

    Return Value

    YES if the rewarded video is ready to be displayed, NO otherwise.