Important: As an App developer, as the controller of data, you must ensure that you have received unambiguous and informed consent from a user before sharing any of their data with Leadbolt or before calling any Leadbolt SDK functions for that user. Please ensure your app is updated as required.

This page will show you how to integrate Leadbolt Native ads using our integration-friendly Native templates in your iOS app.


Before you begin Before you begin

  • Have you logged in to the Leadbolt Publisher Portal?
  • Did you add an App in the portal?
  • Ensure, you have downloaded the Leadbolt SDK and sample app from the link above

Step 1 Add Leadbolt SDK framework

  • Copy the downloaded AppTracker.framework file to your Xcode Project

Step 2 Add the required frameworks

  • Link the following frameworks in your Xcode Project. AdSupport.framework, AVFoundation.framework, CoreMedia.framework, CoreTelephony.framework, StoreKit.framework, SystemConfiguration.framework and libz.tbd

Step 3 Configure App Transport Security (ATS) Settings

  • To ensure all available Leadbolt ads display correctly on apps running on iOS 9/10, please include these ATS settings by adding the following lines of code to your Apps Info.plist file:

Step 4 Add Leadbolt SDK Imports

  • Add the following import header line to your AppDelegate.m file to make use of the Leadbolt SDK in your Project: #import <AppTracker/AppTracker.h>

Step 5 Initialize Leadbolt SDK

  • In your Project’s viewDidLoad method add the following line to initialize the Leadbolt SDK.

You will need to replace "YOUR_APP_API_KEY"  with the specific api key for your app (include the double quotes).

Step 6 To fetch a Native Ad

Step 7 To show a Native Ad

  • Use the onAdsLoaded function in the ATNativeAdDelegate class to get notified

Step 8 Test your Integration

  • Run your Project on an iOS device.
  • Ensure, test ads are displayed when the “loadModule” call is made in your App.
  • Once test ads are seen on your device, go to your Leadbolt Portal and set your App to “Live”
  • Once approved, you should see live ads in your App.

Congratulations! You have successfully integrated the Leadbolt SDK in your App


  • If you are looking to implement Native Ads without templates please visit this page
  • Native Ads may not be available at all times in all countries. It is always best to test with your App in Test Mode in the Publisher Portal as Test Ads are generally always available.
  • You should check your Publisher Portal and ensure the relevant native ad section is visible under your App. Use the “Add Section” button to add if not available.
  • You should check the SDK logs located in Device Logs (under Xcode -> Devices) and look for “AppTracker”.
  • Always test the native sample app provided to confirm any integration issues are SDK based.
  • The SDK has been tested to be compatible on Xcode Version 9.4

Advanced Integration

Pass Additional Info Passing Additional Information

You can increase your App’s performance by optionally including the additional information below. This allows selected premium advertisers to display their Ads to your users. To pass this additional information, use the following methods BEFORE calling loadModuleToCache

Event Listeners Using Event Listeners

With Event listeners, you can closely follow the ad states throughout your App. Leadbolt SDK will trigger events at all important stages of the Ad life-cycle. To implement event listeners in your App, you must implement the ATNativeAdDelegate class.

Setup SDK to use Event Listeners

Before using any of the Event Listener methods, first implement the ATNativeAdDelegate protocol your ViewController class as follows:

Now, set the ATNativeAdDelegate object in the viewDidLoad method BEFORE calling [AppTracker startSession] like so:

Event Listener Methods


← Return to Help Center