Skip to main content

Ad Formats

This guide covers the implementation of different ad formats available in MAS SDK for iOS platforms.

App open ads appear when the user opens your app or switches back to your app. They are displayed on the loading or splash screen.

Benefits

  • An ad overlays the loading screen
  • The unique app open ad layout offers the best user experience for this placement
  • Unlock new inventory: monetize users as soon as they open your app
    • Maximize demands
    • Highest bidding ad creatives
    • Availability of both full-screen and partial-screen ads
    • Optimized user experience rendering

Setup the Auto Delay Load

Setup the auto delay load

Loading a new ad from OnAdLoadFailedEvent() without delay is not recommended. If a new ad has to be loaded immediately on OnAdLoadFailedEvent(), then the auto-delay configuration variable must be set to true to limit ad load retries, thus avoiding continuous failed ad requests and ANR issues.

// Remember to call this function before SDK init.
Yodo1MasAppOpenAd.sharedInstance().autoDelayIfLoadFail = true

Implementation

// Load the ad
Yodo1MasAppOpenAd.sharedInstance().load()

// Check if ad is loaded
let isLoaded = Yodo1MasAppOpenAd.sharedInstance().isLoaded()

// Show ad without placement name
if isLoaded { Yodo1MasAppOpenAd.sharedInstance().show() }

// Show ad with placement name
if isLoaded { Yodo1MasAppOpenAd.sharedInstance().show(withPlacement: "Your placement ID") }

Events

Yodo1MasAppOpenAd.sharedInstance().delegate = self

func onAppOpenAdLoaded(_ ad: Yodo1MasAppOpenAd) {
print("[Yodo1 Mas] App Open ad loaded")
}

func onAppOpenAdFailedToLoad(_ ad: Yodo1MasAppOpenAd, _ error: Yodo1MasError) {
print("[Yodo1 Mas] App Open ad failed to load")
}

func onAppOpenAdOpened(_ ad: Yodo1MasAppOpenAd) {
print("[Yodo1 Mas] App Open ad opened")
}

func onAppOpenAdFailedToOpen(_ ad: Yodo1MasAppOpenAd, _ error: Yodo1MasError) {
print("[Yodo1 Mas] App Open ad failed to open")
}

func onAppOpenAdClosed(_ ad: Yodo1MasAppOpenAd) {
print("[Yodo1 Mas] App Open ad closed")
}

Impression-Level User Revenue

Impression-level user revenue data allows you to access detailed revenue information for each ad impression. This data can be used to compare different sources and campaigns, and to share impression-level ad revenue data with your mobile measurement partner of choice.

You can retrieve the revenue amount in all ad lifecycle callbacks. The following example shows how to do this within a callback:

Yodo1MasAppOpenAd.sharedInstance().adRevenueDelegate = self

func onAppOpenAdPayRevenue(_ ad: Yodo1MasAppOpenAd, _ adValue: Yodo1MasAdValue) {
let revenue = adValue.revenue
let currency = adValue.currency
let revenuePrecision = adValue.revenuePrecision
}

The revenuePrecision takes one of the following values:

  • "publisher_defined": the revenue amount is the price assigned by the publisher
  • "exact": the revenue amount is the result of a real-time auction
  • "estimated": the revenue amount is based on Auto-CPM or FB Bidding estimates
  • "": revenue and precision are not valid (for example, in test mode)