📖
SDKs Integration
  • Quick Start
  • 🤖Android
    • Android SDK Integration
      • Banner Ads
      • Interstitial Ads
      • Rewarded Ads
  • 🍏iOS
    • iOS SDK Integration
      • Banner Ads
      • Interstitial Ads
      • Rewarded Ads
  • Frequently Asked Questions
  • Contact us
  • Documentation
Powered by GitBook
On this page

Was this helpful?

  1. iOS
  2. iOS SDK Integration

Banner Ads

First of all, you need to create a BannerAdController object and init it (with your application context in parameter). After this, you have two possibilities:

  • Display as quickly as possible the ad after loading it. For this, you can simply call the method Adstronomic.loadAndShow with the app context and the ad object as parameters.

  • Just load the ad in the background by calling Adstronomic.loadBanner(). And, when you want to show the ad (after a specific event - For example: click on a button), you can do it with the method show.

So, for example:

var bannerAd: BannerAdController?

bannerAd = BannerAdController.initializeObject()
Adstronomic.loadAndShow(view: self, ad: bannerAd!)

or

var bannerAd: BannerAdController?

Adstronomic.loadBanner()
bannerAd = BannerAdController.initializeObject()

...

// Call when a button is pressed for example
if bannerAd != nil {
    bannerAd?.show(view: self.view)
}
PreviousiOS SDK IntegrationNextInterstitial Ads

Last updated 4 years ago

Was this helpful?

🍏