SDK Debugging

Document created by david.simerly on Oct 20, 2017Last modified by david.simerly on Apr 3, 2018
Version 12Show Document
  • View in full screen mode

PubMatic SDKs 

PubMatic iOS SDK 

Getting Started

Integrating Banner Ads

Integrating Interstitial Ads

Rich Media (MRAID 2.0) Support

Integrating Native Ads

Header Bidding With DFP

Passing Targeting Information

➤  SDK Debugging


PubMatic iOS SDK Reference 

PubMatic iOS SDK provides a logging feature you can use to debug your ads from PubMatic or to get more information about the ad flow. Enable these features by setting an appropriate log level for PubMaticSDK.

 

SDK Log Levels

Here is how you can set a log level for PubMaticSDK:

 

Step 1

Include PubMaticSDK.h the header file:

 

#import "PubMaticSDK.h"

 

Step 2

Set a log level in PubMaticSDK.h:

 

[PubMaticSDK setLogLevel:<#PMLogLevel#>];

 

Default log level is PMLogLevelWarn.

 

There are five log priority levels:

 

PMLogLevelNone —No logs at all
PMLogLevelError
PMLogLevelWarn
PMLogLevelInfo
PMLogLevelDebug—All logs

 

When you set a log level for PubMaticSDK, you'll see all the logs having priority greater than or equal to the set log level; for example, the default log level PMLogLevelWarn enables only warning and error logs in the SDK.

 

All logs are disabled automatically in Release mode.

 

SDK Error Codes

PubMatic SDK gives delegate callbacks on failure of ad loading in multiple cases. These delegate callbacks receive a parameter of type PMError, subclass of NSError. It describes the reason for failure. It has an error-code and localized error-message describing the error event. Please refer the below table for details about the possible error codes and its description.

 

Sr. No.Error TypeError CodeDescription of Error
1INVALID_REQUEST1001Invalid request. May be missing mandatory parameter in request.
2NO_ADS_AVAILABLE1002No ads to show
3NETWORK_ERROR1003There was an error loading data from the network.
4SERVER_ERROR1004The ad server experienced a failure processing the request.
5OS_VERSION_TOO_LOW1005The current device’s OS is below the minimum required version.
6TIMEOUT_ERROR1006Ad request timed out
7INTERSTITIAL_ALREADY_USED1007Will not send request because the interstitial object has already been used.
8INTERNAL_ERROR1008Internal error
9INVALID_RESPONSE1009Invalid ad response
10REQUEST_CANCELLED1013Ad request gets cancelled
11RENDER_ERROR1014Issue in rendering creative

 

Attachments

    Outcomes