Show Sidebar

Upgrade Guide for VMAX iOS SDK 3.6

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.

Older VMAX iOS SDK versions (prior to 3.6.0) will be deprecated soon. You are requested to upgrade to version 3.6.0 at the earliest to continue using VMAX in your apps.
Note: Your account key is displayed on the VMAX Control Panel in User Settings.

What’s new?

VMaxAdDelegate

VMaxAdDelegate has been completely updated, simplifying the protocol adoption for all formats, including the deprecated VMaxRewardedVideoDelegate as well as individual native ad format delegates.

Objective C

VMaxAdView Ad States

Corresponding with the delegate as mentioned above, you can now check for the ad state which now will be set to one of the following possible values depending on the ad lifecycle:

Objective C

You can query for the ad state by using the getAdState api on the adview as illustrated in the example below:

Objective C

VMaxAdSettings

The newly introduced VMaxAdSettings class replaces the formerly used adSettings dictionary property on VMaxAdView. You can now set the scale for billboard ad scaling as well as specify native ad size for native Admob Express Ads.

Objective C

VMaxAdError

The newly introduced VMaxAdError class aims to provide detailed diagnosis for error situations in the ad lifecycle, allowing developers to gracefully handle such situations. VMaxAdError being a subclass of the standard NSError class, you can query for the error code and localizedDescription as you would do normally with an instance of NSError. In addition to this, you can now query for a title should you wish to display it to a user. Below are the possible values.

Objective C

VMaxAdPartner

The newly introduced VMaxAdPartner class aims to provide information about the ad sources. This is helpful in identifying ad sources during ad delivery as well as erroneous situations. You can query for the partner name and partner SDK version for more information through the adPartner property on VMaxAdView.

Objective C

VMaxNativeAd

Image sizing

The VMaxNativeAd class now has a new instance api that is beneficial to correctly display images in native ads, especially in non-helper implementations wherein it is possible that the images do not follow IAB standards for size.
Use the sizeImage:toView api in order to size an image by maintaining aspect ratio in the container. It is required to fetch the image which can be done using the loadImageAsyncWithBlock api on the required VMaxAdImage property (main/medium) of the native ad or via some other networking mechanism.

Objective C

VMaxNativeAdDelegate – onNativeAdReady

The onNativeAdReady delegate has been introduced to notify of the ready-ness of the native ad when using the native helper libs. All the helper libs now conform to the VMaxNativeAdDelegate, unlike versions prior to 3.6.0. Implement this delegate to be notified of when the helper native ad is ready to display.

VMaxMediaView

Autoplay, Mute, Play/Pause

When using the non-helper approach for displaying native ads, you can now play & pause media content of the ad by using the play/pause apis. Further you can set the autoplay & mute properties as well as illustrated below.

Objective C

VMaxMediaViewDelegate

VMaxMediaViewDelegate has been updated to provide useful playback level notifications through new delegates. Comform to this protocol to handle special states during ad playback

Objective C

UX for Billboard ads

VMAX SDK 3.6.0 now has the UX type kVMaxAdUX_Billboard for requesting billboard ads. kVMaxAdUX_IN_Line_Display is now deprecated.

UX for In-Stream ads

VMAX SDK 3.6.0 now has the UX type kVMaxAdUX_InStreamVideo for requesting the in-stream ads; formerly classified as In-Content Video. kVMaxAdUX_InContentVideo is now deprecated.

Deprecations

The following classes & protocols are now obsolete.

  • VMaxWallet (complete)
  • VMaxWalletElement (complete)
  • VMaxRewardedVideo (complete)
  • VMaxRewardedVideoDelegate (complete)
  • VMaxAdView
    • -(void)setAdSettings:(NSDictionary*)adSettings; // use the VMaxAdSettings property instead

Note

    1. You must now conform to the VMaxAdDelegate to be notified for rewarded video completion & gratification of reward.
    2. You must now conform to the VMaxAdSDKDelegate to be notified for rewarded interstitial gratification.

See the documentation on Rewarded Interstitial Ads for more information.