GoogleMobileAds Framework Reference Stay organized with collections Save and categorize content based on your preferences.
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
letkDFPSimulatorID:AnyObject
Use with GADAdLoader to request native app install ads. To receive ads, the ad loader’s delegatemust conform to the GADNativeAppInstallAdLoaderDelegate protocol. See GADNativeAppInstallAd.h.
See GADNativeAdImageAdLoaderOptions.h for ad loader image options.
Declaration
Swift
staticletnativeAppInstall:GADAdLoaderAdTypeUse with GADAdLoader to request native content ads. To receive ads, the ad loader’s delegatemust conform to the GADNativeContentAdLoaderDelegate protocol. See GADNativeContentAd.h.
See GADNativeAdImageAdLoaderOptions.h for ad loader image options.
Declaration
Swift
staticletnativeContent:GADAdLoaderAdTypeUse with GADAdLoader to request native custom template ads. To receive ads, the ad loader’sdelegate must conform to the GADNativeCustomTemplateAdLoaderDelegate protocol. SeeGADNativeCustomTemplateAd.h.
Declaration
Swift
staticletnativeCustomTemplate:GADAdLoaderAdTypeUse with GADAdLoader to request Google Ad Manager banner ads. To receive ads, the ad loader’sdelegate must conform to the DFPBannerAdLoaderDelegate protocol. See DFPBannerView.h.
Declaration
Swift
staticletdfpBanner:GADAdLoaderAdTypeUse with GADAdLoader to request native ads. To receive ads, the ad loader’s delegate mustconform to the GADUnifiedNativeAdLoaderDelegate protocol. See GADUnifiedNativeAd.h.
Declaration
Swift
staticletunifiedNative:GADAdLoaderAdType
iPhone and iPod Touch ad size. Typically 320x50.
Declaration
Swift
letkGADAdSizeBanner:GADAdSizeTaller version of kGADAdSizeBanner. Typically 320x100.
Declaration
Swift
letkGADAdSizeLargeBanner:GADAdSizeMedium Rectangle size for the iPad (especially in a UISplitView’s left pane). Typically 300x250.
Declaration
Swift
letkGADAdSizeMediumRectangle:GADAdSizeFull Banner size for the iPad (especially in a UIPopoverController or inUIModalPresentationFormSheet). Typically 468x60.
Declaration
Swift
letkGADAdSizeFullBanner:GADAdSizeLeaderboard size for the iPad. Typically 728x90.
Declaration
Swift
letkGADAdSizeLeaderboard:GADAdSizeSkyscraper size for the iPad. Mediation only. AdMob/Google does not offer this size. Typically120x600.
Declaration
Swift
letkGADAdSizeSkyscraper:GADAdSizeAn ad size that spans the full width of the application in portrait orientation. The height istypically 50 points on an iPhone/iPod UI, and 90 points tall on an iPad UI.
Declaration
Swift
letkGADAdSizeSmartBannerPortrait:GADAdSizeAn ad size that spans the full width of the application in landscape orientation. The height istypically 32 points on an iPhone/iPod UI, and 90 points tall on an iPad UI.
Declaration
Swift
letkGADAdSizeSmartBannerLandscape:GADAdSizeAn ad size that spans the full width of its container, with a height dynamically determined bythe ad.
Declaration
Swift
letkGADAdSizeFluid:GADAdSizeInvalid ad size marker.
Declaration
Swift
letkGADAdSizeInvalid:GADAdSize
Key for getting the server parameter configured in AdMob when mediating to a custom eventadapter.Example: NSString *serverParameter = connector.credentials[GADCustomEventParametersServer].
Declaration
Swift
letGADCustomEventParametersServer:String
Undocumented
Declaration
Swift
staticletheadlineAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletcallToActionAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticleticonAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletbodyAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletstoreAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletpriceAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletimageAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletstarRatingAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletattributionIconAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletattributionTextAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletmediaViewAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletadChoicesViewAsset:GADNativeAppInstallAssetIDUndocumented
Declaration
Swift
staticletbackgroundAsset:GADNativeAppInstallAssetID
Undocumented
Declaration
Swift
staticletheadlineAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletbodyAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletcallToActionAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletadvertiserAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletimageAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletlogoAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletattributionIconAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletattributionTextAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletmediaViewAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletchoicesViewAsset:GADNativeContentAdAssetIDUndocumented
Declaration
Swift
staticletbackgroundAsset:GADNativeContentAdAssetID
Asset key for the GADMediaView asset view.
Declaration
Swift
letGADNativeCustomTemplateAdMediaViewKey:String
Add this constant to the testDevices property’s array to receive test ads on the simulator.
Declaration
Swift
letkGADSimulatorID:AnyObject
Rating for content suitable for general audiences, including families.
Declaration
Swift
staticletgeneral:GADMaxAdContentRatingRating for content suitable for most audiences with parental guidance.
Declaration
Swift
staticletparentalGuidance:GADMaxAdContentRatingRating for content suitable for teen and older audiences.
Declaration
Swift
staticletteen:GADMaxAdContentRatingRating for content suitable only for mature audiences.
Declaration
Swift
staticletmatureAudience:GADMaxAdContentRating
Google AdMob Ads error domain.
Declaration
Swift
letkGADErrorDomain:String
Undocumented
Declaration
Swift
staticletheadlineAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletcallToActionAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticleticonAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletbodyAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletstoreAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletpriceAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletimageAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletstarRatingAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletadvertiserAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletmediaViewAsset:GADUnifiedNativeAssetIdentifierUndocumented
Declaration
Swift
staticletadChoicesViewAsset:GADUnifiedNativeAssetIdentifier
Project version string for GoogleMobileAds.
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.