GoogleMobileAds Framework Reference

Constants

The following constants are available globally.

  • Add this constant to the testDevices property’s array to receive test ads on the simulator.

    Declaration

    Swift

    let kDFPSimulatorID: AnyObject

    Objective-C

    extern id _Nonnull const kDFPSimulatorID
  • Use with GADAdLoader to request native custom template ads. To receive ads, the ad loader’s delegate must conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. See GADNativeCustomTemplateAd.h.

    Declaration

    Swift

    static let nativeCustomTemplate: GADAdLoaderAdType

    Objective-C

    extern GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeNativeCustomTemplate
  • Use with GADAdLoader to request Google Ad Manager banner ads. To receive ads, the ad loader’s delegate must conform to the DFPBannerAdLoaderDelegate protocol. See DFPBannerView.h.

    Declaration

    Swift

    static let dfpBanner: GADAdLoaderAdType

    Objective-C

    extern GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeDFPBanner
  • Use with GADAdLoader to request native ads. To receive ads, the ad loader’s delegate must conform to the GADUnifiedNativeAdLoaderDelegate protocol. See GADUnifiedNativeAd.h.

    Declaration

    Swift

    static let unifiedNative: GADAdLoaderAdType

    Objective-C

    extern GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeUnifiedNative