Banner ads refer to a standard advertising format that occupies a designated space within an app's layout, usually positioned either at the top or bottom of the device screen.
[Important Note]: At present, Pangle supports only two specific banner ad sizes for traffic outside of the Chinese Mainland, namely 300x250(dp) and 320x50(dp). It is crucial to ensure that the banner ad placement and size comply with Pangle's specific requirements to ensure optimal ad performance and user experience.
Create an app and banner ad placement on the Pangle platform
The main steps to integrate banner ads are:
Loading an ad is accomplished using the + (
void
)loadAdWithSlotID:request: completionHandler:()
method in the PAGBannerAd
class. The method requires an ad slot id, instance objects of PAGBannerRequest
, and a block. In the block, please set the rootViewController, set the ad delegate of PAGBannerAdDelegate, and get the bannerView. After getting bannerView, choose the right time to add bannerView to your own view.
PAGBannerAdDelegate | description |
- (void)adDidShow:(PAGBannerAd *)ad | This method is invoked when the ad is displayed, covering the device's screen. |
- (void)adDidClick:(PAGBannerAd *)ad | This method is invoked when the ad is clicked by the user. |
- (void)adDidDismiss:(PAGBannerAd *)ad | This method is invoked when the ad disappears. |
Now you have finished the integration. If you wanna test your apps, make sure you use test ads rather than live, production ads. The easiest way to load test ads is to use test mode. It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging.
Refer to the How to add a test device? to add your device to the test devices on Pangle platform.