Show Sidebar

Requesting Rewarded Video Incent Ads – iOS SDK

Rất tiếc, mục này chỉ tồn tại ở English. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

From 3.6.0

1. Initialising VMaxAdSDK

Beginning with 3.6.0 for rewarded interstitials, it is mandatory to initialise the newly introduced VMaxAdSDK. This needs to be done as early as possible in the application lifecycle. The VMaxAdSDK asynchronously gratifies rewards via the VMaxAdSDKDelegate. Thus it is necessary to conform to the VMaxAdSDKDelegate protocol to receive rewards and further gratify users of your app. Attempt to request rewarded interstitial ads only on successful initialization of the VMaxAdSDK.

Objective C

2. Adding Firebase dependencies

You are also required to add Firebase dependencies to your project. You can download them from Firebase’ official site or add them from the VMAX iOS SDK zip file by dragging & dropping them into your Xcode project.
The following files & frameworks are required:

  • FirebaseAnalytics.framework
  • FirebaseCore.framework
  • FirebaseInstanceID.framework
  • GoogleInterchangeUtilities.framework
  • GoogleSymbolUtilities.framework
  • GoogleToolboxForMac.framework
  • FirebaseAuth.framework
  • GTMSessionFetcher.framework
  • FirebaseDatabase.framework
  • Firebase.h

Requesting Rewarded Interstitial ads

After completing the prerequisites to request rewarded interstitial ads, you are required to initialise an adview with the initWithRewardedInterstitialAdspotID:viewController:withAdUXType initializer. Do not attempt to initialise using the standard initWithAdspotID:viewController:withAdUXType initializer as it will have adverse effects and result in ad failure.
Create an instance of the VMaxAdView and conform to the delegate.

Creating the Ad View

Objective C

Requesting Rewarded Video ads

Create an instance of the VMaxAdView and conform to the delegate.

Creating the Ad View

Objective C

It is recommended to check for ad states before calling show ad.

Objective C

Before 3.6.0

Note: Some partners like Chartboost support incent pre-roll and post-roll messages via their interface. So make sure to turn OFF pre-roll and post-roll messages while using VMAX Rewarded Video Incent Ads.

Initializing Wallet with Rewarded Video Ads

Import the header files for Rewarded Videos.

Creating walletElement instance

The VMAX SDK allows you to pass extra data to identify users for serving targeted campaign ads. Read more.

Objective CSwift

Wallet Delegates

Implement following delegate methods in your Wallet delegate

Create Rewarded Video instance

The VMAX SDK allows you to pass extra data that is then available in a postback URL. Visit the VMAX Control Panel and enter the postback URL in Settings >> Apps and Adspots >> Rewarded Video Adspots. Once you define the key value pairs here, and configure the postback URL, you will get these keys and values as additional URL parameters on your server.

Objective CSwift

Rewarded Video Callbacks

Enable or disable rewarded video popup

Customise a rewarded video popup

Postback URL for rewarded videos

To add the postback URL for rewarded videos, visit Settings >> Apps and Adspots >> Rewarded Video Adspots

What would you like to do next?