GoogleMobileAds Framework Reference Stay organized with collections Save and categorize content based on your preferences.
Classes
The following classes are available globally.
The view that displays Ad Manager banner ads.
To request this ad type using GADAdLoader, you need to pass kGADAdLoaderAdTypeDFPBanner (seeGADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader’s initializer method. If yourequest this ad type, your delegate must conform to the DFPBannerAdLoaderDelegate protocol.
Declaration
Objective-C
@interfaceDFPBannerView:GADBannerView
Ad loader options for banner ads.
Declaration
Objective-C
@interfaceDFPBannerViewOptions:GADAdLoaderOptions
Custom rendered ad. Your application renders the ad.
Declaration
Objective-C
@interfaceDFPCustomRenderedAd:NSObject
Google Ad Manager interstitial ad, a full-screen advertisement shown at naturaltransition points in your application such as between game levels or news stories.
Declaration
Objective-C
@interfaceDFPInterstitial:GADInterstitial
Specifies optional parameters for ad requests.
Declaration
Objective-C
@interfaceDFPRequest:GADRequest
Displays AdChoices content.
If a GADAdChoicesView is set on GADNativeAppInstallAdView or GADNativeContentAdView prior tocalling -setNativeAppInstallAd: or -setNativeContentAd:, AdChoices content will render insidethe GADAdChoicesView. By default, AdChoices is placed in the top right corner ofGADNativeAppInstallAdView and GADNativeContentAdView.
Declaration
Objective-C
@interfaceGADAdChoicesView:UIView
Ad loader options base class. See each ad type’s header for available GADAdLoaderOptionssubclasses.
Declaration
Objective-C
@interfaceGADAdLoaderOptions:NSObject
Loads ads. See GADAdLoaderAdTypes.h for available ad types.
Declaration
Objective-C
@interfaceGADAdLoader:NSObject
Reward information for GADRewardBasedVideoAd ads.
Declaration
Objective-C
@interfaceGADAdReward:NSObject
Provides audio and video notifications and configurations management.
Don’t create an instance of this class and use the one available from GADMobileAdssharedInstace’s audioVideoManager.
Declaration
Objective-C
@interfaceGADAudioVideoManager:NSObject
The view that displays banner ads. A minimum implementation to get an ad from within aUIViewController class is:
// Create and setup the ad view, specifying the size and origin at {0, 0}. GADBannerView *adView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner]; adView.rootViewController = self; adView.adUnitID = @
ID created when registering your app
; // Place the ad view onto the screen. [self.view addSubview:adView]; // Request an ad without any additional targeting information. [adView loadRequest:[GADRequest request]];Declaration
Objective-C
@interfaceGADBannerView:UIView
Represents a correlation between multiple ads. Set an instance of this object on multiple ads toindicate they are being used in a common context.
Declaration
Objective-C
@interfaceGADCorrelator:NSObject
Ad loader options for adding a correlator to a native ad request.
Declaration
Objective-C
@interfaceGADCorrelatorAdLoaderOptions:GADAdLoaderOptions
Create an instance of this class to set additional parameters for each custom event object. Theadditional parameters for a custom event are keyed by the custom event label. These extras arepassed to your implementation of GADCustomEventBanner or GADCustomEventInterstitial.
Declaration
Objective-C
@interfaceGADCustomEventExtras:NSObject<GADAdNetworkExtras>
Specifies optional ad request targeting parameters that are provided by the publisher and areforwarded to custom events for purposes of populating an ad request to a 3rd party ad network.
Declaration
Objective-C
@interfaceGADCustomEventRequest:NSObject
Displays debug options to the user.
Declaration
Objective-C
@interfaceGADDebugOptionsViewController:UIViewController
Use to configure Custom Search Ad (CSA) ad requests. A dynamic height search banner can containmultiple ads and the height is set dynamically based on the ad contents. Please cross-referencethe property sections and properties with the official reference document:https://developers.google.com/custom-search-ads/docs/reference
Declaration
Objective-C
@interfaceGADDynamicHeightSearchRequest:GADRequest
Ad network extras sent to Google networks.
Declaration
Objective-C
@interfaceGADExtras:NSObject<GADAdNetworkExtras>
The consumable in-app purchase item that has been purchased by the user. The purchase flow ishandled by the Google Mobile Ads SDK.Instances of this class are created and passed to your in-app purchase delegate after the userhas successfully paid for a product. Your code must correctly deliver the product to the userand then call the didCompletePurchase method to finish the transaction.
Declaration
Objective-C
@interfaceGADDefaultInAppPurchase:NSObject
The in-app purchase item to be purchased with the purchase flow handled by you, theapplication developer.Instances of this class are created and passed to your GADInAppPurchaseDelegate object whenusers click a buy button. It is important to report the result of the purchase back to the SDKin order to track metrics about the transaction.
Declaration
Objective-C
@interfaceGADInAppPurchase:NSObject
An immutable snapshot of a mediation adapter’s initialization status.
Declaration
Objective-C
@interfaceGADAdapterStatus:NSObject<NSCopying>
An immutable snapshot of the Google Mobile Ads SDK’s initialization status, categorized bymediation adapter.
Declaration
Objective-C
@interfaceGADInitializationStatus:NSObject<NSCopying>
An interstitial ad. This is a full-screen advertisement shown at natural transition points inyour application such as between game levels or news stories.
Declaration
Objective-C
@interfaceGADInterstitial:NSObject
Provides media content information. Interact with instances of this class on the main queueonly.
Declaration
Objective-C
@interfaceGADMediaContent:NSObject
Displays native ad media content.
To display media content in GADUnifiedNativeAdView instances, add a GADMediaView subview,assign the native ad view’s mediaView property, and set the native ad’s mediaContent property tothe media view.
If the native ad contains video content, the media view displays the video content.
If the native ad doesn’t have video content and image loading is enabled, the media viewdisplays the first image from the native ad’s |images| property.
If the native ad doesn’t have video content and image loading is disabled, the media view isempty.
Declaration
Objective-C
@interfaceGADMediaView:UIView
Google Mobile Ads SDK settings.
Declaration
Objective-C
@interfaceGADMobileAds:NSObject
Ad loader options for requesting multiple ads. Requesting multiple ads in a single request iscurrently only available for native app install ads and native content ads.
Declaration
Objective-C
@interfaceGADMultipleAdsAdLoaderOptions:GADAdLoaderOptions
Reason for muting the ad.
Declaration
Objective-C
@interfaceGADMuteThisAdReason:NSObject
Native ad base class. All native ad types are subclasses of this class.
Declaration
Objective-C
@interfaceGADNativeAd:NSObject
Native ad image.
Declaration
Objective-C
@interfaceGADNativeAdImage:NSObject
Ad loader options for native ad image settings.
Declaration
Objective-C
@interfaceGADNativeAdImageAdLoaderOptions:GADAdLoaderOptions
Ad loader options for configuring the view of native ads.
Declaration
Objective-C
@interfaceGADNativeAdViewAdOptions:GADAdLoaderOptions
Native app install ad. To request this ad type, you need to passkGADAdLoaderAdTypeNativeAppInstall (see GADAdLoaderAdTypes.h) to the |adTypes| parameter inGADAdLoader’s initializer method. If you request this ad type, your delegate must conform tothe GADNativeAppInstallAdLoaderDelegate protocol.
Declaration
Objective-C
@interfaceGADNativeAppInstallAd:GADNativeAd
Base class for app install ad views. Your app install ad view must be a subclass of this classand must call superclass methods for all overriden methods.
Declaration
Objective-C
@interfaceGADNativeAppInstallAdView:UIView
Native content ad. To request this ad type, you need to pass kGADAdLoaderAdTypeNativeContent(see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader’s initializer method. Ifyou request this ad type, your delegate must conform to the GADNativeContentAdLoaderDelegateprotocol.
Declaration
Objective-C
@interfaceGADNativeContentAd:GADNativeAd
Base class for content ad views. Your content ad view must be a subclass of this class and mustcall superclass methods for all overriden methods.
Declaration
Objective-C
@interfaceGADNativeContentAdView:UIView
Native custom template ad. To request this ad type, you need to passkGADAdLoaderAdTypeNativeCustomTemplate (see GADAdLoaderAdTypes.h) to the |adTypes| parameterin GADAdLoader’s initializer method. If you request this ad type, your delegate must conform tothe GADNativeCustomTemplateAdLoaderDelegate protocol.
Declaration
Objective-C
@interfaceGADNativeCustomTemplateAd:GADNativeAd
The view that displays native ads. A minimum implementation to get an ad from within aUIViewController class is:
// Create and setup the ad view, specifying the size and origin at {0, 0}. GADNativeExpressAdView *adView = [[GADNativeExpressAdView alloc] initWithAdSize:kGADAdSizeBanner]; adView.rootViewController = self; adView.adUnitID = @
ID created when registering your app
; // Place the ad view onto the screen. [self.view addSubview:adView]; // Request an ad without any additional targeting information. [adView loadRequest:[GADRequest request]];Declaration
Objective-C
@interfaceGADNativeExpressAdView:UIView
Mute This Ad options.
Declaration
Objective-C
@interfaceGADNativeMuteThisAdLoaderOptions:GADAdLoaderOptions
Specifies optional parameters for ad requests.
Declaration
Objective-C
@interfaceGADRequest:NSObject<NSCopying>
Request configuration. The settings in this class will apply to all ad requests.
Declaration
Objective-C
@interfaceGADRequestConfiguration:NSObject
Represents the error generated due to invalid request parameters.
Declaration
Objective-C
@interfaceGADRequestError:NSError
The GADRewardBasedVideoAd class is used for requesting and presenting a reward based video ad.This class isn’t thread safe.
Declaration
Objective-C
@interfaceGADRewardBasedVideoAd:NSObject
The GADRewardedAd class is used for requesting and presenting a rewarded ad.
Declaration
Objective-C
@interfaceGADRewardedAd:NSObject
A view that displays search ads.To show search ads: 1) Create a GADSearchBannerView and add it to your view controller’s view hierarchy. 2) Create a GADSearchRequest ad request object to hold the search query and other search data. 3) Call GADSearchBannerView’s -loadRequest: method with the GADSearchRequest object.
Declaration
Objective-C
@interfaceGADSearchBannerView:GADBannerView
Specifies parameters for search ads.
Declaration
Objective-C
@interfaceGADSearchRequest:GADRequest
Options for server-to-server verification callbacks for a rewarded ad.
Declaration
Objective-C
@interfaceGADServerSideVerificationOptions:NSObject<NSCopying>
Unified native ad. To request this ad type, pass kGADAdLoaderAdTypeUnifiedNative(see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader’s initializer method. Ifyou request this ad type, your delegate must conform to the GADUnifiedNativeAdLoaderDelegateprotocol.
Declaration
Objective-C
@interfaceGADUnifiedNativeAd:NSObject
Base class for native ad views. Your native ad view must be a subclass of this class and mustcall superclass methods for all overridden methods.
Declaration
Objective-C
@interfaceGADUnifiedNativeAdView:UIView
The video controller class provides a way to get the video metadata and also manages videocontent of the ad rendered by the Google Mobile Ads SDK. You don’t need to create an instance ofthis class. When the ad rendered by the Google Mobile Ads SDK loads video content, you may beable to get an instance of this class from the rendered ad object.
Declaration
Objective-C
@interfaceGADVideoController:NSObject
Video ad options.
Declaration
Objective-C
@interfaceGADVideoOptions:GADAdLoaderOptions
Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may performsome action (e.g. opening an in app browser or opening the iTunes store) when handling callbacksfrom GADMediatedNativeAdDelegate. Adapters in such case should notify the Google Mobile Ads SDKby calling the relevant methods from this class.
Declaration
Objective-C
@interfaceGADMediatedNativeAdNotificationSource:NSObject
Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may performsome action (e.g. opening an in app browser or opening the iTunes store) when handling methodsin GADMediatedUnifiedNativeAd. Adapters in such case should notify the Google Mobile Ads SDK bycalling the relevant methods from this class.
Declaration
Objective-C
@interfaceGADMediatedUnifiedNativeAdNotificationSource:NSObject
Provided by the Google Mobile Ads SDK for the adapter to render the ad. Contains 3PAS and otherad configuration information.
Declaration
Objective-C
@interfaceGADMediationAdConfiguration:NSObject
Undocumented
Declaration
Objective-C
@interfaceGADMediationBannerAdConfiguration:GADMediationAdConfiguration
Undocumented
Declaration
Objective-C
@interfaceGADMediationInterstitialAdConfiguration:GADMediationAdConfiguration
Undocumented
Declaration
Objective-C
@interfaceGADMediationNativeAdConfiguration:GADMediationAdConfiguration
Undocumented
Declaration
Objective-C
@interfaceGADMediationRewardedAdConfiguration:GADMediationAdConfiguration
Mediation configuration set by the publisher on the AdMob UI.
Declaration
Objective-C
@interfaceGADMediationCredentials:NSObject
Third party SDK configuration.
Declaration
Objective-C
@interfaceGADMediationServerConfiguration:NSObject
Request parameters provided by the publisher and Google Mobile Ads SDK.
Declaration
Objective-C
@interfaceGADRTBRequestParameters:NSObject
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-03-03 UTC.