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.
Please add different information to your podfile based on the integrated TopOn iOS SDK version:
pod 'TPNDebugUISDK','1.0.3'
After adding, please execute pod install --repo-update
The steps to get it are: Login to TopOn Dashboard
-> Account Management
-> Key
-> SDK Debug Key
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.
Enable SDK log switch, search for IDFA in logs. After SDK initialization, if ATAdLog prints out IDFA, it's considered successful.
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:
//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"];
});
DebugUI supports long press to copy information and share current page data.
- 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.
② Select a completed integrated ad platform to enter debug mode.
③ Select ad platform's ad format for testing operations
Online ID testing feature is only available in iOS DebugUI version 1.0.3 and above.
① Click on an ad placement to enter the ad placement testing page
② Perform online ad placement testing