Testing and Troubleshooting

Retrieve the CreativeID

It may happen that some advertisers escape ad quality checks and end up compromising the user experience on the app by showcasing either an irrelevant, distasteful, or disrupting creative to the user. To combat such situations, you can retrieve the creativeID of the ad instance and report back to your InMobi point of contact with the encrypted creativeID. CreativeID is a property of IMBanner, IMInterstitial and IMNative object, which can be retrieved as follow:

Objective

- (void)bannerDidFinishLoading:(IMBanner*)banner { 
    NSString* creativeId = banner.creativeId;
}


Swift

public func bannerDidFinishLoading(_ banner: IMBanner!) {
    bannerAd.creativeId
}

Test Integration

You can test your integration by navigating to the Integration Tab on the InMobi Publisher Dashboard.

To set up a test device, you will need the corresponding device ID. The device id is basically the IDFA or IFA (Identifier for Advertising). To get device ID:

Objective

#import AdSupport 
NSString* deviceID = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];


Swift

import AdSupport 
let deviceId = ASIdentifierManager.shared().advertisingIdentifier.uuidString

After you retrieve your Device ID, you can proceed with setting up your test device on the Publisher Dashboard.

  1. From the left navigation panel, select Integration Integration Testing.
  2. Click New Device.
  3. Fill in the information for your test device and click Add Device.

After you add the device, you can serve test ads and see how they render across your apps.

Helpful Debug Information

  1. Set log level to debug: [IMSdk setLogLevel: kIMSDKLogLevelDebug]
  2. You will get feedback on the diagnostics tab on the ad unit and ad request and this can be particularly helpful during integration.


The important set of logs are documented in the following tables.

SDK Initialization

Scenario

Log Level

Logs

Publisher passed valid account id

Debug

InMobi SDK initialized with account id:

Publisher passed an invalid account Id

Error

Invalid account id passed to init. Please provide a valid account id.

Newer version of SDK is available

Debug

A newer version (ver. 9.0.0) of the InMobi SDK is available! You are currently on an older version (ver. 5.3.1). Download the latest InMobi SDK from http://www.inmobi.com/products/sdk/#downloads.

Ads Common

Scenario

Log Level

Logs

Ad requested when no network available

Error

Network not reachable currently. Please try again.

Ad requested when ad state is loading or available

Error

An ad load is already in progress. Please wait for the load to complete before requesting for another ad (Placement id : ).

Ad requested when ad is viewed by user

Error

An ad is currently being viewed by the user. Please wait for the user to close the ad before requesting for another ad (Placement id : ).


Messages for Ad Integrations

 Banner

Scenario

Log Level

Logs

Publisher created a banner without initializing the SDK

Error

Please initialize the SDK before creating a Banner ad

Publisher created a banner with an invalid/null placement id

Error

Please provide a valid placement id to create a Banner ad

Publisher called load on a banner from IB/xml with improper placement id

Error

Please provide a valid placement id to create a Banner ad

Publisher called load on a banner

Debug

Fetching a Banner ad for placement id: ()

Successfully fetched ad

Debug

Banner ad successfully fetched for placement id: ()

Failed to fetch the ad

Debug

Failed to fetch Banner ad for placement id: ( with error: )

Started loading the banner in a webview

Debug

Started loading Banner ad markup in the webview for placement id: ()

Banner successfully loaded in the webview

Debug

Successfully loaded Banner ad markup in the webview for placement id: ()

Failed to load banner in the webview

Debug

Failed to load the Banner markup in the webview for placement id: ()

Banner refresh is initiated

Debug

Initiating Banner refresh for placement id: ()


Interstitial

Scenario

Log Level

Logs

Publisher created a interstitial without initializing the SDK

Error

Please initialize the SDK before creating a interstitial ad

Publisher created a interstitial with an invalid placement id

Error

Please provide a valid placement id to create a interstitial ad

Publisher called load on an interstitial

Debug

Fetching an interstitial ad for placement id:

Successfully fetched ad

Debug

Interstitial ad successfully fetched for placement id:

Failed to fetch the ad

Error

Failed to fetch Interstitial ad for placement id: with error:

Started loading the interstitial in a webview

Debug

Started loading Interstitial ad markup in the webview for placement id:

Interstitial successfully loaded in the webview

Debug

Successfully loaded Interstitial ad markup in the webview for placement id:

Failed to load interstitial in the webview

Error

Failed to load the Interstitial markup in the webview for placement id:

Interstitial Ad displayed

Debug

Successfully displayed Interstitial for placement id:

Interstitial Ad dismissed

Debug

Interstitial ad dismissed for placement id:

Ad show before ready Show ad before it's ready

Error

Ad Load is not complete. Please wait for the Ad to be in a ready state before calling show

Full screen ad cannot be displayed without a view controller. Please pass a view controller to present the full screen ad.

Error

Full screen ad cannot be displayed without a view controller. Please pass a view controller to present the full screen ad.

Rewarded Video

Scenario

Log Level

Logs

Publisher created a interstitial without initializing the SDK

Error

Please initialize the SDK before creating a interstitial ad

Publisher created a interstitial with an invalid placement id

Error

Please provide a valid placement id to create a interstitial ad

Publisher called load on an interstitial

Debug

Fetching an interstitial ad for placement id:

Successfully fetched ad

Debug

Interstitial ad successfully fetched for placement id:

Failed to fetch the ad

Error

Failed to fetch Interstitial ad for placement id: with error:

Started loading the interstitial in a webview

Debug

Started loading Interstitial ad markup in the webview for placement id:

Interstitial successfully loaded in the webview

Debug

Successfully loaded Interstitial ad markup in the webview for placement id:

Failed to load interstitial in the webview

Error

Failed to load the Interstitial markup in the webview for placement id:

Interstitial Ad displayed

Debug

Successfully displayed Interstitial for placement id:

Interstitial Ad dismissed

Debug

Interstitial ad dismissed for placement id:

Ad show before ready Show ad before it's ready

Error

Ad Load is not complete. Please wait for the Ad to be in a ready state before calling show

Full screen ad cannot be displayed without a view controller. Please pass a view controller to present the full screen ad.

Error

Full screen ad cannot be displayed without a view controller. Please pass a view controller to present the full screen ad.

Native

Scenario

Log Level

Log Message

Publisher created a native ad without initializing the SDK

Error

Please initialize the SDK before creating a Native ad

Publisher created a native ad with an invalid placement id

Error

Please provide a valid placement id to create a native ad

Publisher called load on a native

Debug

Fetching a Native ad for placement id:

Ad is successfully fetched from server

Debug

Native ad successfully fetched for placement id:

Failed to fetch the ad

Error

Failed to fetch Native ad for placement id : with error : 

On This Page

Last Updated on: 01 Sep, 2021