iOS App Open Ads doc for mediation

💡 This document is for developers integrate Pangle through mediation like MAX, IronSource, AdMob and etc.
Since mediation will automatically initialize the SDK for developers, you no longer need to initialize pangle by yourself. Pangle will only be initialized once. To ensure that the initialization configuration of the mediation will not be affected, please do not initialize Pangle repeatedly.
Set host app icon and check the initialization status
Before integrating App Open Ads, please do the following first.
1.
Use [PAGConfig shareConfig].appLogoImage = [UIImage imageNamed:@"AppIcon"]; to set host app icon
2.
If you use SDK version v4.6.0.2 and above, you can use KVO to monitor the initialization status , it will be called once SDK has been initialized.
[NSNotificationCenter.defaultCenter addObserver:self
selector:@selector(_PAGAdSDKHasBeenInitialized)
name:@"PAGAdSDKHasBeenInitialized"
object:nil];
.......
- (void)_PAGAdSDKHasBeenInitialized {
}
3.
Make sure that the SDK has been initialized by mediation before proceeding to the next step.
Load an ad
Loading an ad is accomplished using the loadAdWithSlotID: request: completionHandler:() method on the PAGLAppOpenAd class. The method requires an ad slot id, an instance object of PAGOpenRequest, and a completionHandler to be notified when ad loading succeeds or fails. The loaded PAGLAppOpenAd object is provided as a parameter in the success callback.
Create PAGOpenRequest object
PAGRewardedRequest is an Ad Loading Manager. It is recommended to be the member variable of the Activity. This class can configure the load timeout period.
PAGOpenRequest *request = [PAGOpenRequest request]
Load an ad and Register completionHandler callback