SASMediationInterstitialAdapter
Objective-C
@protocol SASMediationInterstitialAdapter <NSObject>
Swift
protocol SASMediationInterstitialAdapter : NSObjectProtocol
Protocol implemented by mediation adapters that load and show interstitial ads.
-
The mediation interstitial adapter delegate if any, nil otherwise.
Declaration
Objective-C
@property (weak, nullable) id<SASMediationInterstitialAdapterDelegate> delegate;
Swift
weak var delegate: (any SASMediationInterstitialAdapterDelegate)? { get set }
-
The name of the mediated SDK.
Declaration
Objective-C
@property (readonly) NSString *_Nonnull sdkName;
Swift
var sdkName: String { get }
-
The version of the mediated SDK.
Declaration
Objective-C
@property (readonly) NSString *_Nonnull sdkVersion;
Swift
var sdkVersion: String { get }
-
The version of the mediation adapter.
Declaration
Objective-C
@property (readonly) NSString *_Nonnull adapterVersion;
Swift
var adapterVersion: String { get }
-
Load a mediation ad using a third party SDK.
Note
The mediation adapter must signal the success or the failure of the ad loading using the delegate to allow the mediation waterfall to work properly.
Declaration
Objective-C
- (void)loadAdWithServerSideParameters:(nonnull NSString *)serverSideParameters clientSideParameters:(nullable NSDictionary<NSString *, id> *) clientSideParameters;
Swift
func loadAd(withServerSideParameters serverSideParameters: String, clientSideParameters: [String : Any]?)
Parameters
serverSideParameters
A string parsed in the ad response representing the data to pass to the mediation adapter.
clientSideParameters
A dictionary of client side parameters set by the publisher that can be forwarded to the third party SDK if any, nil otherwise.
-
Show the previously loaded interstitial ad.
Declaration
Objective-C
- (void)showWithModalParentViewController: (nonnull UIViewController *)modalParentViewController;
Swift
func show(withModalParentViewController modalParentViewController: UIViewController)
Parameters
modalParentViewController
The view controller that should be used as parent of the interstitial ad being shown.