Classes

The following classes are available globally.

  • The view that displays DoubleClick For Publishers banner ads.

    To request this ad type using GADAdLoader, you need to pass kGADAdLoaderAdTypeDFPBanner (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader’s initializer method. If you request this ad type, your delegate must conform to the DFPBannerAdLoaderDelegate protocol.

    Declaration

    Swift

    class DFPBannerView

    Objective-C

    @interface DFPBannerView : GADBannerView
  • Custom rendered ad. Your application renders the ad.

    Declaration

    Swift

    class DFPCustomRenderedAd

    Objective-C

    @interface DFPCustomRenderedAd : NSObject
  • DoubleClick For Publishers interstitial ad, a full-screen advertisement shown at natural transition points in your application such as between game levels or news stories.

    Declaration

    Swift

    class DFPInterstitial

    Objective-C

    @interface DFPInterstitial : GADInterstitial
  • Specifies optional parameters for ad requests.

    Declaration

    Swift

    class DFPRequest

    Objective-C

    @interface DFPRequest : GADRequest
  • Displays AdChoices content.

    If a GADAdChoicesView is set on GADNativeAppInstallAdView or GADNativeContentAdView prior to calling -setNativeAppInstallAd: or -setNativeContentAd:, AdChoices content will render inside the GADAdChoicesView. By default, AdChoices is placed in the top right corner of GADNativeAppInstallAdView and GADNativeContentAdView.

    Declaration

    Swift

    class GADAdChoicesView

    Objective-C

    @interface GADAdChoicesView
  • Loads ads. See GADAdLoaderAdTypes.h for available ad types.

    Declaration

    Swift

    class GADAdLoader : NSObject

    Objective-C

    @interface GADAdLoader : NSObject
  • Ad loader options base class. See each ad type’s header for available GADAdLoaderOptions subclasses.

    Declaration

    Swift

    class GADAdLoaderOptions : NSObject

    Objective-C

    @interface GADAdLoaderOptions : NSObject
  • Reward information for GADRewardBasedVideoAd ads.

    Declaration

    Swift

    class GADAdReward : NSObject

    Objective-C

    @interface GADAdReward : NSObject
  • Provides audio and video notifications and configurations management. Available only on iOS 7 and above.

    Don’t create an instance of this class and use the one available from GADMobileAds sharedInstace’s audioVideoManager.

    Declaration

    Swift

    class GADAudioVideoManager

    Objective-C

    @interface GADAudioVideoManager : NSObject
  • The view that displays banner ads. A minimum implementation to get an ad from within a UIViewController 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

    Swift

    class GADBannerView

    Objective-C

    @interface GADBannerView
  • Represents a correlation between multiple ads. Set an instance of this object on multiple ads to indicate they are being used in a common context.

    Declaration

    Swift

    class GADCorrelator : NSObject

    Objective-C

    @interface GADCorrelator : NSObject
  • Create an instance of this class to set additional parameters for each custom event object. The additional parameters for a custom event are keyed by the custom event label. These extras are passed to your implementation of GADCustomEventBanner or GADCustomEventInterstitial.

    Declaration

    Swift

    class GADCustomEventExtras : NSObject

    Objective-C

    @interface GADCustomEventExtras : NSObject <GADAdNetworkExtras>
  • Specifies optional ad request targeting parameters that are provided by the publisher and are forwarded to custom events for purposes of populating an ad request to a 3rd party ad network.

    Declaration

    Swift

    class GADCustomEventRequest

    Objective-C

    @interface GADCustomEventRequest : NSObject
  • Displays debug options to the user.

    Declaration

    Swift

    class GADDebugOptionsViewController

    Objective-C

    @interface GADDebugOptionsViewController
  • Ad network extras sent to Google networks.

    Declaration

    Swift

    class GADExtras : NSObject

    Objective-C

    @interface GADExtras : NSObject <GADAdNetworkExtras>
  • The consumable in-app purchase item that has been purchased by the user. The purchase flow is handled by the Google Mobile Ads SDK. Instances of this class are created and passed to your in-app purchase delegate after the user has successfully paid for a product. Your code must correctly deliver the product to the user and then call the didCompletePurchase method to finish the transaction.

    Declaration

    Swift

    class GADDefaultInAppPurchase : NSObject

    Objective-C

    @interface GADDefaultInAppPurchase : NSObject
  • The in-app purchase item to be purchased with the purchase flow handled by you, the application developer. Instances of this class are created and passed to your GADInAppPurchaseDelegate object when users click a buy button. It is important to report the result of the purchase back to the SDK in order to track metrics about the transaction.

    Declaration

    Swift

    class GADInAppPurchase : NSObject

    Objective-C

    @interface GADInAppPurchase : NSObject
  • An interstitial ad. This is a full-screen advertisement shown at natural transition points in your application such as between game levels or news stories.

    Declaration

    Swift

    class GADInterstitial

    Objective-C

    @interface GADInterstitial : NSObject
  • Displays native ad media assets.

    To display media assets in GADNativeAppInstallAdView instances, add a GADMediaView subview and assign the native ad view’s mediaView property.

    If the native ad doesn’t contain a video and image loading is enabled, the GADMediaView displays the native ad’s |images| asset’s first image.

    If the native ad doesn’t contain a video and image loading is disabled, the GADMediaView object is empty.

    Declaration

    Swift

    class GADMediaView

    Objective-C

    @interface GADMediaView
  • Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform some action (e.g. opening an in app browser or open the iTunes store) when handling callbacks from GADMediatedNativeAdDelegate. Adapters in such case should notify the Google Mobile Ads SDK by calling the relevant methods from this class.

    Declaration

    Swift

    class GADMediatedNativeAdNotificationSource : NSObject

    Objective-C

    @interface GADMediatedNativeAdNotificationSource : NSObject
  • Google Mobile Ads SDK settings.

    Declaration

    Swift

    class GADMobileAds : NSObject

    Objective-C

    @interface GADMobileAds : NSObject
  • Native ad base class. All native ad types are subclasses of this class.

    Declaration

    Swift

    class GADNativeAd : NSObject

    Objective-C

    @interface GADNativeAd : NSObject
  • Native ad image.

    Declaration

    Swift

    class GADNativeAdImage : NSObject

    Objective-C

    @interface GADNativeAdImage : NSObject
  • Native app install ad. To request this ad type, you need to pass kGADAdLoaderAdTypeNativeAppInstall (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader’s initializer method. If you request this ad type, your delegate must conform to the GADNativeAppInstallAdLoaderDelegate protocol.

    Declaration

    Swift

    class GADNativeAppInstallAd

    Objective-C

    @interface GADNativeAppInstallAd : GADNativeAd
  • Base class for app install ad views. Your app install ad view must be a subclass of this class and must call superclass methods for all overriden methods.

    Declaration

    Swift

    class GADNativeAppInstallAdView

    Objective-C

    @interface GADNativeAppInstallAdView
  • 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. If you request this ad type, your delegate must conform to the GADNativeContentAdLoaderDelegate protocol.

    Declaration

    Swift

    class GADNativeContentAd

    Objective-C

    @interface GADNativeContentAd : GADNativeAd
  • Base class for content ad views. Your content ad view must be a subclass of this class and must call superclass methods for all overriden methods.

    Declaration

    Swift

    class GADNativeContentAdView

    Objective-C

    @interface GADNativeContentAdView
  • Native custom template ad. To request this ad type, you need to pass kGADAdLoaderAdTypeNativeCustomTemplate (see GADAdLoaderAdTypes.h) to the |adTypes| parameter in GADAdLoader’s initializer method. If you request this ad type, your delegate must conform to the GADNativeCustomTemplateAdLoaderDelegate protocol.

    Declaration

    Swift

    class GADNativeCustomTemplateAd

    Objective-C

    @interface GADNativeCustomTemplateAd : GADNativeAd
  • The view that displays native ads. A minimum implementation to get an ad from within a UIViewController 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

    Swift

    class GADNativeExpressAdView

    Objective-C

    @interface GADNativeExpressAdView
  • Specifies optional parameters for ad requests.

    Declaration

    Swift

    class GADRequest : NSObject, NSCopying

    Objective-C

    @interface GADRequest : NSObject <NSCopying>
  • Represents the error generated due to invalid request parameters.

    Declaration

    Swift

    class GADRequestError : NSError

    Objective-C

    @interface GADRequestError : NSError
  • The GADRewardBasedVideoAd class is used for requesting and presenting a reward based video ad. This class isn’t thread safe.

    Declaration

    Swift

    class GADRewardBasedVideoAd : NSObject

    Objective-C

    @interface GADRewardBasedVideoAd : 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

    Swift

    class GADSearchBannerView

    Objective-C

    @interface GADSearchBannerView : GADBannerView
  • Specifies parameters for search ads.

    Declaration

    Swift

    class GADSearchRequest

    Objective-C

    @interface GADSearchRequest : GADRequest
  • The video controller class provides a way to get the video metadata and also manages video content of the ad rendered by the Google Mobile Ads SDK. You don’t need to create an instance of this class. When the ad rendered by the Google Mobile Ads SDK loads video content, you may be able to get an instance of this class from the rendered ad object. Currently only native express ad view class exposes video controller.

    Declaration

    Swift

    class GADVideoController : NSObject

    Objective-C

    @interface GADVideoController : NSObject