iOS Admob Adapter Installation

iOS Admob Adapter Installation

Requirements

  • The Appnext AdMob Adapter supports IOS 7+ devices only
  • The Appnext AdMob Adapter must be implemented with the relevant SDK - both can be downloaded below
  • The Appnext AdMob Adapter requires internet access to pull ads information for your app

Adapter Installation

Before starting the integration process, please download the following files:

  • Appnext SDK from here
  • Appnext AdMob adapter, from here

Unzip the adapter and Appnext SDK zip files in a folder of your choice.
The AdMob adapter zip file includes the following components:

  • ‘AppnextAdMobAdapter/libAppnextAdMobAdapter.a’ the adapter library file
  • ‘AppnextAdMobAdapter/include/AppnextAdMobAdapter’ folder containing the adapter .h interface files.
  • ‘AppnextAdMobAdapterSwiftTest’ folder containing a swift example project using the adapter.
  • ‘AppnextAdMobAdapterTest’ folder containing an Objective-C example project using the adapter.
  • ‘CHANGELOG.md’ the adapter change log file.
  • ‘GoogleMobileAdsSdkiOS’ folder containing Google AdMob SDK integrated into the example projects.

The Appnext SDK zip file includes the following components:

  • ‘AppnextIOSSDK/libAppnextLib.a’ library file
  • ‘AppnextIOSSDK/libAppnextSDKCore.a’ library file
  • ‘AppnextIOSSDK/include/AppnextLib’ folder which include the .h interface files
  • ‘AppnextIOSSDK/include/AppnextSDKCore’ folder which include the .h interface files
  • ‘AppnextNewNativeLibSDKSwiftTest’ folder which include a swift example project
  • ‘AppnextNewNativeLibSDKTest’ folder which include an Objective-C example project
  • ‘CHANGELOG.md’ the SDK change log file.

Step 1: Add the Appnext AdMob adapter and Appnext SDK to your project.

Link ‘libAppnextAdMobAdapter.a’, ‘libAppnextLib.a’ and ‘libAppnextSDKCore.a’ to your project.

  1. Click on your project in the ‘Project navigator’->’Build Phases’->’Link Binary With Libraries’ -> ’+’ -> ’Add Other…’ and go to the folder where you unzipped the adapter package. Choose ‘libAppnextAdMobAdapter.a’, ‘libAppnextLib.a’ and ‘libAppnextSDKCore.a’.
  2. Make sure to add the relative paths from your project’s directory to the libraries in the ‘Build Settings’->‘Library Search Paths’ (It should look something like – ‘$(PROJECT_DIR)/AppnextAdMobAdapter’ and also ‘$(PROJECT_DIR)/AppnextiOSSDK’).

Step 2: Add the Appnext AdMob adapter and SDK .h files to your project

  • Go to the ‘include/AppnextAdMobAdapter’ and ‘include/AppnextLib’ folders and add all the .h files there to your project (grab all the .h files into the ‘Project Navigator’ area or grab the entire folders just the same).
  • Make sure to add the relative path from your project’s directory to the ‘include’ folder in the ‘Build Settings’->‘Header Search Paths’. (It should look something like – ‘$(PROJECT_DIR)/AppnextAdMobAdapter/include’ and ‘$(PROJECT_DIR)/AppnextiOSSDK /include’).

Step 3: Add additional system frameworks to your project

These frameworks are required for the work of the SDK. Click on your project in the ‘Project navigator’->’Build Phases’->’Link Binary With Libraries’->’+’ and add the following frameworks:

  • ‘QuartzCore.framework’
  • ‘Security.framework’
  • ‘CFNetwork.framework’
  • ‘AVFoundation.framework’
  • ‘SystemConfiguration.framework’
  • ‘MobileCoreServices.framework’
  • ‘CoreGraphics.framework’
  • ‘CoreMedia.framework’
  • ‘AdSupport.framework’
  • ‘UIKit.framework’
  • ‘Foundation.framework’
  • ‘CoreTelephony.framework’

Step 4: Add additional Linker flags

Add ‘-ObjC’ linker flag. Go to ‘Build Settings’->‘Other Linker Flags’ and add ‘-ObjC’ flag

696

Step 5: App Transport Security configuration

iOS 9 introduces a new feature called App Transport Security (ATS), which prevents an app from making non-secure connections.
Some of the install redirects from the SDK go through 'http' links. If ATS is not disabled, these redirects will be blocked and publisher revenue will drop.
To prevent this, add a new Dictionary entry to your app's Info.plist file called AppTransportSecurity, then add an entry to that dictionary with a key of AllowsArbitraryLoads with YES as value.
After adding the entry your plist file will have the entry as marked:

578

What’s Next

Integrate one of the adapter's ad units