MoPub (iOS)


InMobi is now a supported SDK network on MoPub’s mediation platform and integrating the InMobi SDK is easy. Read this topic to know more about the integration instructions. 

You have access to the following ad types from InMobi via MoPub mediation: 

  • Banner 
  • Medium - Banner 
  • Full-screen (Interstitial, Full-screen Video Ads) 
  • Rewarded Video 

Before you start setting up InMobi as a network on the MoPub dashboard, it’s important that you create an InMobi account, complete your payment information, register your app, and configure placements to get monetizing. For more information, see Getting Started.

After you complete the above steps, you can start setting up InMobi as a network on MoPub. Let’s begin! 


The latest version of InMobi SDK supports iOS 9 or higher. Also, this version of iOS SDK requires XCode 12 or higher.

Configure InMobi as a Network

  1. On the MoPub UI, navigate to the Networks tab. 
    Graphical user interface, application

Description automatically generated 

  1. Click New Network. 

  1. Search for InMobi in the list of SDK Networks, implementation type. 
    Graphical user interface

Description automatically generated 

  1. Click InMobi, select your network settings, and save. 
    Graphical user interface, application

Description automatically generated 

    Your account ID is available in your InMobi account as shown below.



    The Placement ID is present under the Placements section as shown below.

  1. Enter the InMobi Account ID and the Placement ID on the App & ad unit setup of the MoPub dashboard. 

Add the SDK and Adapter

Integrating the InMobi SDK into your project is fairly seamless. But before we begin, let’s pause for some checks:


Checkpoint 1: Preparing your App for iOS 10

App Transport Security (ATS), a default setting introduced with iOS 9 that mandates apps to make network connections only over TLS version 1.2 and later. Though InMobi is committed to the adoption of HTTPS, the current setup requires our demand partners to support this change and be 100% compliant with all the requirements of ATS.

While we work with our partners progressing towards a secure environment, to ensure ads work on iOS 9 and later versions, you need to follow these steps as a near-term fix:

Disable ATS (Recommended) - to ensure non-secure content from the partners work correctly in your updated apps. To disable ATS flag, add the following code snippet to your app's Info.plist.



Disable ATS with exceptions (Not Recommended) - in case you plan to migrate towards ATS compliance. You can achieve so by allowing secure content from your domains by adding them on the exception list.



Refrain from using InMobi domains and CDN in the exception list as it will result in errors during the runtime.

App Store Review

If ATS is not disabled for apps, monetization will be impacted on devices running iOS 9+. The demand ecosystem has yet to migrate to SSL enabled world, causing ads not to render. The ATS disablement will trigger additional App Store review for your app, and requires you to provide justification. A sample of justification for consideration:

For monetization must support serving ads from the advertisers that do not support secure connections.

Checkpoint 2: iOS 12 WiFi Settings

Apple has introduced privacy settings to access WiFi details from iOS 12 onwards. To boost monetization and relevant user experience we encourage sharing WiFi details for targeted advertising.

  1. Enable Access WiFi Information on your App ID.

  2. Enable Access WiFi Information for your target app from XCode capabilities.

  3. Ensure WiFi Access is added to your App.entitlements file.

Add the InMobi SDK

For more information on how to integrate with the MoPub SDK and InMobi SDK, check out MoPub’s official documentation page for InMobi here

Pass User Consent to InMobi SDK

Since MoPub-InMobi Adapters don't handle GDPR currently, we suggest you manually pass the consent to InMobi. This is optional and applicable only if you are not relying on MoPub for acquiring consent.

What is a consentObject? - A consentObject is a dictionary representation of all kinds of consent provided by the publisher to the SDK. The key is mandatory if you wish to monetize traffic from EEA region. You can read further on GDPR regulations here.

Key Type Inference
gdpr_consent String A consent string is a series of numbers, which identifies the consent status of an Adtech Vendor.

The string must follow the IAB contracts as mentioned here.

gdpr_consent_available String "true": The user has provided consent to collect and use data.

"false": The user has not provided consent to collect and use data.

Any value other than “true” and “false” is invalid and will be treated as a value not provided by the user.

The key, gdpr_consent_available can be accessed via string constant IM_GDPR_CONSENT_IAB.

gdpr String Whether or not the request is subjected to GDPR regulations (0 = No, 1 = Yes), omission indicates Unknown.


As part of the General Data Protection Regulation (“GDPR”) publishers who collect data on their apps, are required to have a legal basis for collecting and processing the personal data of users in the European Economic Area (“EEA”). Ensure that you obtain appropriate consent from the user before making ad requests to InMobi for Europe and indicate the same by following our recommended SDK implementation. Do not pass any demographics information of a user; if you do not have user consent from such user in Europe.

A consentObject has to be provided in every session. SDK does not persist consent, it only keeps the consentObject in memory. If the app is relaunched, SDK will lose the consentObject. Within a session, a consentObject can be updated as below:


[IMSdk updateGDPRConsent:@{<Insert consentObject dictionary here>}];


IMSdk.updateGDPRConsent(<Insert consentObject dictionary here>)


Advanced Configurations

Providing Location and Demographics Data


If your app collects location from the user, we recommend passing it up, as impressions with location signals have higher revenue potential. InMobi SDK will automatically pass the location signals if available in the app. If you use location in your app but would like to disable passing location signals to InMobi, then select NO under the “Location Permission” section for your property on the InMobi Customer Interface.

Otherwise, modify the Custom Event class for your ad unit to pass on the data using the InMobi SDK API. For more details, see the sample code for more details.

InMobi supports the following parameters:

Method Name












The age group of the user


CLLocation object


Setting up Demographic Parameters

Here is a sample for setting up the InMobi SDK Demographic params. Publishers are requested to set the values of params as they want:

[IMSDK setAgeGroup:kIMSDKAgeGroupBetween18And24];
[IMSdk setGender:kIMSDKGenderMale];

Audio Handling in WKWebView

AVAudioSession. This will help preempt any content interruptions and help address user experience issues upfront. For more information read these Apple documents: Article 1, Article 2.

On This Page

Last Updated on: 09 Mar, 2022