Menu

DebugUI Debug Tool

You can use DebugUI to verify the integration of TopOn iOS SDK and test various ad platform functions in your project, but DebugUI cannot test your App's own ad logic.

Note: Custom ad platforms only support online ad placement testing functionality, other features are not supported.

1. Prerequisites

  • TopOn iOS SDK has been imported and successfully activated in your project
  • Cocoapods is installed

2. Import TopOn iOS DebugUI

Please add different information to your podfile based on the integrated TopOn iOS SDK version:

ruby Copy
pod 'TPNDebugUISDK','1.0.3'

After adding, please execute pod install --repo-update

3. Enable TopOn iOS DebugUI in Your Project

3.1 Get Debug Key from TopOn Dashboard

The steps to get it are: Login to TopOn Dashboard -> Account Management -> Key -> SDK Debug Key

3.2 Get IDFA

Please select "Allow" for the IDFA popup. DebugUI needs to obtain IDFA information through code to work properly. If you're not sure how to get IDFA, please refer here.

3.2.1 How to Verify SDK Can Successfully Get IDFA

Enable SDK log switch, search for IDFA in logs. After SDK initialization, if ATAdLog prints out IDFA, it's considered successful.

IDFA Verification

3.3 Display DebugUI

Before calling the DebugUI display API, you need to ensure:

  • iOS SDK has been successfully initialized
  • Will not trigger ad loading logic
  • ATAdLog has printed out IDFA
  • Turn off debug mode

Before your App goes live, please delete DebugUI related code.

In your AppDelegate or main view controller, fill in the DebugKey and use the following API to display DebugUI:

objc Copy
//Import header file
#import <AnyThinkDebuggerUISDK/ATDebuggerAPI.h>

    //Call, note that push method requires a navigation controller, controller object parameter should not inherit and override some methods, if parameters are correct and IDFA is normally obtained by SDK but still not displayed, you can use GCD to delay 2 seconds to call the following API
    [[ATDebuggerAPI sharedInstance] showDebuggerInViewController:self showType:ATShowDebugUIPush debugkey:@"Your Debug Key"];

or

    //Example of displaying with 2-second delay
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [[ATDebuggerAPI sharedInstance] showDebuggerInViewController:self showType:ATShowDebugUIPush debugkey:@"Your Debug Key"];
    });

4. DebugUI Feature Introduction

DebugUI supports long press to copy information and share current page data.

4.1 View Basic Information

Basic Information

4.2 View TopOn SDK Settings

SDK Settings1SDK Settings2

4.3 Integration Detection

Integration Detection 1 Integration Detection 2

4.4 Debug Mode Testing

  • When debugging overseas ad platforms, you may need to use proxy networks. For InMobi, it's recommended to proxy to Southeast Asia, with India being optimal. For Pangle, proxy to non-US regions. For other overseas platforms, you can try proxying to the platform's country/region to improve ad fill rates.
  • Ad sources in debug mode are not 100% filled. For example, Meta ad platform requires Facebook app to be installed on the test device, and requires quality devices and proxy networks to achieve lower fill probability.
  • Debug mode works by using TopOn's pre-configured ad sources, which are not 100% guaranteed to fill ads successfully.

① You can check the switch on the following page to enable debug mode.

Debug Mode Switch

② Select a completed integrated ad platform to enter debug mode.

Select Ad Platform

③ Select ad platform's ad format for testing operations

Ad Format Testing 1 Ad Format Testing 2 Ad Format Testing 3

4.5 Online ID Testing

Online ID testing feature is only available in iOS DebugUI version 1.0.3 and above.

4.5.1 Display App Information and Ad Placement Configuration

App Information and Ad Placement Configuration

4.5.2 Online Ad Placement Testing

① Click on an ad placement to enter the ad placement testing page

② Perform online ad placement testing

Previous
How to test ads
Next
Error code
Last modified: 2025-07-29Powered by