YMARewardedAd Class Reference

Inherits from NSObject
Declared in YMARewardedAd.h

Overview

This class is responsible for loading rewarded video ads.

  1. Properties
    1. blockID
    2. loaded
    3. delegate
    4. shouldOpenLinksInApp
    5. hasBeenPresented
    6. userID
  2. Methods
    1. – initWithBlockID:
    2. – load
    3. – loadWithRequest:
    4. – presentFromViewController:
    5. – presentFromViewController:dismissalBlock:

Properties

blockID

Block ID is a unique identifier in the R-M-XXXXXX-Y format, which is assigned in the Partner interface.

@property (nonatomic, copy, readonly) NSString *blockID

loaded

Notifies that the ad is loaded and ready to be displayed. After the property takes the YES value, the [YMARewardedAdDelegate rewardedAdDidLoadAd:] delegate method is called.

@property (nonatomic, assign, readonly) BOOL loaded

delegate

An object that implements the YMARewardedAdDelegate protocol that tracks ad lifecycle events.

@property (nonatomic, weak) id<YMARewardedAdDelegate> delegate

shouldOpenLinksInApp

Defines whether to open links in the app or in the browser installed on the device. The default value is NO.

@property (nonatomic, assign) BOOL shouldOpenLinksInApp

hasBeenPresented

Notifies whether the ad was displayed.

@property (nonatomic, assign, readonly) BOOL hasBeenPresented

userID

Unique app user ID. Defaults to nil. Used for reward confirmation on the server side.

@property (nonatomic, copy) NSString *userID

Methods

– initWithBlockID:

Initializes an object of the YMARewardedAd class with a rewarded video ad.

- (instancetype)initWithBlockID:(NSString *)blockID

Parameters

blockID

Block ID is a unique identifier in the R-M-XXXXXX-Y format, which is assigned in the Partner interface.

Return Value

An object of the YMARewardedAd class with a rewarded video ad.

– load

Preloads an ad. After this, use the [YMARewardedAd presentFromViewController:] method to start showing the ad.

- (void)load

– loadWithRequest:

Preloads the ad by setting the data for targeting.

- (void)loadWithRequest:(YMAAdRequest *)request

Parameters

request

Data for targeting (YMAAdRequest).

– presentFromViewController:

Displays ads after preloading.

- (void)presentFromViewController:(UIViewController *)viewController

Parameters

viewController

An object of the UIViewController class, which is used to display a rewarded video ad.

– presentFromViewController:dismissalBlock:

Displays an ad after preloading it and performs some action immediately after showing the ad.

- (void)presentFromViewController:(UIViewController *)viewController
                   dismissalBlock:(void ( ^ ) ( void ))dismissalBlock

Parameters

viewController

An object of the UIViewController class, which is used to display a rewarded video ad.

dismissalBlock

A block of code that executes after the ad is shown.


Generated by appledoc 2.2.1 (build 1334).