CERewardedVideoAD
Overview
CERewardedVideoAD is used to request rewarded video ad.
Interface
eventDelegate
eventDelegateDeclaration
@property (nonatomic, weak, nullable) id<CERewardedVideoADEventDelegate> eventDelegate;Discussion
Delegate which is notified by SDK when CERewardedVideoAD triggered the ad event.
ad
adDeclaration
@property (nonatomic, strong, readonly, nullable) Ad * ad;Discussion
An Ad object containing data of the loaded ad.
- loadAdInstantWithInfo:
- loadAdInstantWithInfo:Declaration
- (BOOL)loadAdInstantWithInfo:(nonnull CERequestInfo *)info
                        error:(NSError **)error;Parameters
name
description
info
CERequestInfo instance used to specify the parameters for ad request.
error
NSError instance used to specify the error for ad request.
Discussion
Start loading ad content process synchronously, and it will ignore the timeout in CERequestInfo.
- loadAdAsyncWithInfo:
- loadAdAsyncWithInfo:Declaration
- (void)loadAdAsyncWithInfo:(nonnull CERequestInfo *)info
                reqDelegate:(id<CERewardedVideoADRequestDelegate>)reqDelegate;Parameters
name
description
info
CERequestInfo instance used to specify the parameters for ad request.
reqDelegate
id<CERewardedVideoADRequestDelegate> instance that receive request ad event.
Discussion
Start loading ad content process asynchronously. Use this api with timeout greater than 0 if you can wait for loading a rewarded video ad. In most cases you should preload the ad and show the ad with loadAdInstantWithInfo to have better UX between UI transitions.
- showFromViewController:
- showFromViewController:Declaration
- (void) showFromViewController:(nonnull UIViewController *)viewController
                       animated:(BOOL)animated;Parameters
name
description
viewController
The view controller from which rewarded video ad will be presented.
animated
YES to show the rewarded video ad with animation; otherwise, NO
Discussion
Use this method to present a rewarded video ad when it is loaded.
- dismissAnimated:
- dismissAnimated:Declaration
- (void) dismissAnimated:(BOOL)animated;Parameters
name
description
animated
YES to dismiss the rewarded video ad with animation; otherwise, NO.
Discussion
Use this method to dismiss the rewarded video ad.
- setDismissAdAfterEngageAd:
- setDismissAdAfterEngageAd:Declaration
- (void) setDismissAdAfterEngageAd:(BOOL)dismissAd;Parameters
name
description
dismissAd
YES to automatically dismiss rewarded video ad if it opens the browser/webview due to user engagement; otherwise, NO
Discussion
Use this method to automatically dismiss rewarded video ad after user is back from the redirect browser/webview. The default is NO.
- getTotalFileSize
- getTotalFileSizeDeclaration
- (long long)getTotalFileSize;Return Value
The total size of the creative files downloaded for this ad.
- isRewardedVideoAdVC
- isRewardedVideoAdVCDeclaration
- (BOOL) isRewardedVideoAdVC:(nonnull UIViewController *)vc;Parameters
name
description
viewController
The view controller
Discussion
Return whether viewcontroller is a rewardedVideo AD viewcontroller
Return Value
bool to indicate viewcontroller is a CrystalExpress rewardedVideo AD viewcontroller
Last updated
