VMAX
 
 
 
 
Show Sidebar

VMAX SDK for iOS

ขออภัยรายการนี้จะใช้ได้เฉพาะในภาษาอังกฤษ 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.

Step 1: Download the SDK

Before proceeding, ensure that you have downloaded the latest version of the VMAX SDK for iOS from here. Alternatively, you can sue the Xcode plugin to integrate VMAX. Read more on how to use the Xcode plugin.

The minimum requirements for VMAX SDK for iOS are Xcode 6.2 and iOS version 8.0. If you wish to use Google AdMob or Millennial Media Mediation, the minimum requirements are Xcode 7.0 and iOS version 9.0.

Step 2: Set up the SDK

Extract all the files from the SDK archive into a separate folder.

Add support for iOS 9

Currently the VMAX SDK and all the Mediation Adapters do not support Bitcode in Xcode 7 (iOS 9). So if you are using Xcode 7 then in Build Settings set “Enable Bitcode” setting to NO. Also add -lxml2 and -ObjC to Linker Flags.

Enable Bitcode Setting to No

Currently the VMAX SDK and all the Mediation Adapters does not support Bitcode in XCode 7 (iOS9). Hence if you are using XCode 7 then in Build Settings set “Enable Bitcode” setting to NO.

image05

Add Linker Flags

Add -lxml2 and -ObjC to Linker Flags.

image07

Support for iOS 9

iOS 9 support only HTTPS communication. To override this behaviour set the below dictionary in your application info.plist.

Additional Steps for Swift

  1. Add VMAXSDK-Bridge.h to your Xcode Swift project.
  2. Go to the Xcode Build settings. Set Objective C Bridging Header setting to VMAXSDK-Bridge.h relative path from your Xcode project file. Bellow screenshot shows this for the VMAX Swift Sample.
    image2
  3. VMAXSDK-Bridge.h also bridges VMAX Native Ad Adapters Helper libraries which is disabled by default. If you intend to use VMAX Native Helper libraries in your application, then define the Preprocessor Macro VMAX_USING_NATIVE_ADS in your application Build Setting as shown below. This will include the header files of VMAX Native helper libraries.
    image3

Step 3: Integrate the SDK

Using Objective-C

Import Header Files

Confirm Your Class

You need to confirm your class to VMaxAdDelegate protocol to be able to receive the SDK Callbacks. For the MyCustomViewController integration class, the signature is shown below:

MyCustomViewController.m

SDK Calls

Using Swift

You need to confirm your class to VMaxAdDelegate protocol to be able to receive the SDK Callbacks. For the ViewController integration class, the signature is shown below:

Next Steps

Once you’re done with these preliminary steps, read more on how to request ads.