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
  • Use with GADAdLoader to request native app install ads. To receive ads, the ad loader’s delegate must conform to the GADNativeAppInstallAdLoaderDelegate protocol. See GADNativeAppInstallAd.h.

    See GADNativeAdImageAdLoaderOptions.h for ad loader image options.

    Declaration

    Swift

    static let nativeAppInstall: GADAdLoaderAdType
  • Use with GADAdLoader to request native content ads. To receive ads, the ad loader’s delegate must conform to the GADNativeContentAdLoaderDelegate protocol. See GADNativeContentAd.h.

    See GADNativeAdImageAdLoaderOptions.h for ad loader image options.

    Declaration

    Swift

    static let nativeContent: GADAdLoaderAdType
  • 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
  • Use with GADAdLoader to request DFP 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
  • 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
  • iPhone and iPod Touch ad size. Typically 320x50.

    Declaration

    Swift

    let kGADAdSizeBanner: GADAdSize
  • Taller version of kGADAdSizeBanner. Typically 320x100.

    Declaration

    Swift

    let kGADAdSizeLargeBanner: GADAdSize
  • Medium Rectangle size for the iPad (especially in a UISplitView’s left pane). Typically 300x250.

    Declaration

    Swift

    let kGADAdSizeMediumRectangle: GADAdSize
  • Full Banner size for the iPad (especially in a UIPopoverController or in UIModalPresentationFormSheet). Typically 468x60.

    Declaration

    Swift

    let kGADAdSizeFullBanner: GADAdSize
  • Leaderboard size for the iPad. Typically 728x90.

    Declaration

    Swift

    let kGADAdSizeLeaderboard: GADAdSize
  • Skyscraper size for the iPad. Mediation only. AdMob/Google does not offer this size. Typically 120x600.

    Declaration

    Swift

    let kGADAdSizeSkyscraper: GADAdSize
  • An ad size that spans the full width of the application in portrait orientation. The height is typically 50 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI.

    Declaration

    Swift

    let kGADAdSizeSmartBannerPortrait: GADAdSize
  • An ad size that spans the full width of the application in landscape orientation. The height is typically 32 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI.

    Declaration

    Swift

    let kGADAdSizeSmartBannerLandscape: GADAdSize
  • An ad size that spans the full width of its container, with a height dynamically determined by the ad.

    Declaration

    Swift

    let kGADAdSizeFluid: GADAdSize
  • Invalid ad size marker.

    Declaration

    Swift

    let kGADAdSizeInvalid: GADAdSize
  • Key for getting the server parameter configured in AdMob when mediating to a custom event adapter. Example: NSString *serverParameter = connector.credentials[GADCustomEventParametersServer].

    Declaration

    Swift

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

    Declaration

    Swift

    let kGADSimulatorID: AnyObject
  • Google AdMob Ads error domain.

    Declaration

    Swift

    let kGADErrorDomain: String