Share your feedback and help shape the Google Mobile Ads SDK roadmap. Take the Google Mobile Ads SDK Annual Survey for 2023 before it closes on May 5th, 2023.

GoogleMobileAds Framework Reference

Stay organized with collections Save and categorize content based on your preferences.

Type-Definitions

The following type definitions are available globally.

  • Undocumented

    Declaration

    Swift

    struct GADAdLoaderAdType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable

    Objective-C

    typedef NSString *GADAdLoaderAdType
  • Ad metadata key type.

    Declaration

    Swift

    struct GADAdMetadataKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable, @unchecked Sendable

    Objective-C

    typedef NSString *GADAdMetadataKey
  • A block to be executed when the user earns a reward.

    Declaration

    Swift

    typealias GADUserDidEarnRewardHandler = () -> Void

    Objective-C

    typedef void (^GADUserDidEarnRewardHandler)(void)
  • A valid GADAdSize is considered to be one of the predefined GADAdSize constants or a GADAdSize constructed by GADAdSizeFromCGSize, GADAdSizeFullWidthPortraitWithHeight, GADAdSizeFullWidthLandscapeWithHeight.

    Do not create a GADAdSize manually. Use one of the GADAdSize constants. Treat GADAdSize as an opaque type. Do not access any fields directly. To obtain a concrete CGSize, use the function CGSizeFromGADAdSize().

    Declaration

    Objective-C

    typedef struct GADAdSize GADAdSize
  • Handles ad events that are estimated to have earned money.

    Declaration

    Swift

    typealias GADPaidEventHandler = (GADAdValue) -> Void

    Objective-C

    typedef void (^GADPaidEventHandler)(GADAdValue *_Nonnull)