Skip to content

iOS SDK: Supported ads and networks

On every pass the SDK looks through the visible windows at the normal window level of every active scene and finds, through the Ad80GoogleMobileAds module:

ViewNotes
Google Mobile Ads banners: BannerView (including Ad Manager banners)Fixed and adaptive banners. Network and AdMob response id come from the view’s public responseInfo.
Native ads: NativeAdViewNetwork and AdMob response id come from the responseInfo of the view’s nativeAd.

The SDK never looks inside Google’s views and never changes them; it captures the whole ad view as drawn.

Not captured:

  • Full-screen formats (interstitial, rewarded, rewarded interstitial, app open) are not found by themselves. They are captured only when your app opts in for each show, see Full-screen ads (opt-in).
  • Views in windows above the normal window level, and views that are not Google Mobile Ads views: register them with Ad80.register.
  • Ads that are covered by another view or window, partly off screen, transformed, animated or in a scene that is not active: reported as SKIPPED_OCCLUDED, SKIPPED_PARTIALLY_VISIBLE, SKIPPED_VISIBILITY_UNVERIFIED or SKIPPED_NO_WINDOW_FOCUS, never captured.
  • Video areas: on a real device the capture method cannot read hardware video layers. When such a layer leaves transparent pixels in a banner or native ad, the SDK reports UNSUPPORTED_LAYER_CONTENT and uploads no image for it.
  • <ViewController>/<accessibilityIdentifier> when the view has an accessibility identifier, for example FeedViewController/banner_top;
  • otherwise <ViewController>/adunit:<adUnitId> when the ad unit id is known;
  • otherwise <ViewController>/anon:<n>.

<ViewController> is the type name of the nearest view controller of the view (app when there is none). Two views that would get the same id get #2, #3 and so on. Set accessibilityIdentifier on your ad views so their placements are stable and readable.

For AdMob mediation, the SDK reads the adapter that actually served the ad (responseInfo.loadedAdNetworkResponseInfo) and maps its adapter class name to a network id. These ids are recognized:

google, meta, applovin, unity, ironsource, liftoff, inmobi, mintegral, pangle, chartboost, dt_exchange, moloco, line, maio, mytarget, imobile, bigo, bidmachine, pubmatic, verve.

Ads from AdMob’s own sources are refined by ad source: google for the AdMob Network (bidding and waterfall), admob_reservation for reservation campaigns and admob_house for mediated house ads.

An adapter that is not in the table is reported as adapter:<class name>, and an ad without any attribution as unknown. The raw values are sent as they are, never guessed.

Interstitial, rewarded, rewarded interstitial and app open ads of Google Mobile Ads are presented in a view controller of Google’s own, not in a view of your layout, so the SDK does not find them by itself. It captures one only when your app opts in: call Ad80.trackFullScreenAd immediately before presenting the loaded ad, and Ad80.untrackFullScreenAd if you decide not to present it.

import Ad80
// Right before presenting the loaded ad. placementId is optional.
Ad80.trackFullScreenAd(interstitial, placementId: "Level/interstitial")
interstitial.present(from: viewController)
// If you decide not to present after all:
Ad80.untrackFullScreenAd(interstitial)
[AD80 trackFullScreenAd:ad placementId:nil];
[ad presentFromRootViewController:self];
  • Which objects: InterstitialAd (including AdManagerInterstitialAd), RewardedAd, RewardedInterstitialAd and AppOpenAd. Any other object is ignored. Without a placement id, the placement is <ViewController>/fullscreen:<adUnitId>.
  • What you assert: by calling it you state that this ad is the one presented next, and that your app and its libraries add nothing to the ad’s view. The call is valid for 5 seconds; after that, or after untrackFullScreenAd, the ad is untracked.
  • What is captured: the root view of Google’s full-screen view controller, as a whole, never your own view controllers or the rest of the screen. One image per show, taken once the opening transition has finished.
  • An untracked full-screen ad produces a diagnostic and no image. The SDK reports SKIPPED_FULLSCREEN_NOT_TRACKED and uploads nothing. Ad80.register is for views in your layout, not for full-screen ads.
  • The SDK never presents or dismisses ads and never sets fullScreenContentDelegate.
  • The switch: capture also needs the app’s Full-screen ad capture switch to be on (see Remote configuration). Without it the SDK reports SKIPPED_FULLSCREEN_DISABLED.

Full-screen ads that were not captured are explained in Troubleshooting.

Use Ad80.register for ad views the SDK does not find by itself: views in windows above the normal level, or your own ad views. A registered view is captured like a discovered one, under the placement id you give. Unregister it when it goes away. Both calls run on the main thread.

import Ad80
Ad80.register(adView, placementId: "Checkout/sheet_banner", metadata: provider)
Ad80.unregister(adView)
// The provider is called off the main thread: make it thread-safe and never let it trap.
final class Provider: Ad80MetadataProvider {
func currentMetadata() -> Ad80AdMetadata? { // nil while not known yet
Ad80AdMetadata(mediationPlatform: "admob", adapterClassName: "...", responseId: "...")
}
}
[AD80 register:view placementId:@"Checkout/sheet_banner" metadata:nil];
[AD80 unregister:view];

Ad80AdMetadata fields, in order: mediationPlatform (required, for example "admob"), adapterClassName, adSourceName, adSourceId, adSourceInstanceName, adSourceInstanceId, mediationAdapterClassName, responseId. All but the first may be nil.

  • You assert that the whole view is ad content. Registration bypasses no check: consent, visibility and the other gates still apply.
  • Passing nil as metadata is allowed.
  • The view is held weakly.
  • A failing provider is not isolated: it must not trap or raise an Objective-C exception.
  • Metadata from a provider is reported with the provenance EXPLICIT_REGISTRATION.