Constants
The following constants are available globally.
-
Use with GADAdLoader to request native custom template ads. To receive ads, the ad loader’s delegate must conform to the GADCustomNativeAdLoaderDelegate protocol. See GADCustomNativeAd.h.
Declaration
Swift
static let customNative: GADAdLoaderAdType
Objective-C
extern GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeCustomNative
-
Use with GADAdLoader to request Google Ad Manager banner ads. To receive ads, the ad loader’s delegate must conform to the GAMBannerAdLoaderDelegate protocol. See GAMBannerView.h.
Declaration
Swift
static let gamBanner: GADAdLoaderAdType
Objective-C
extern GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeGAMBanner
-
Use with GADAdLoader to request native ads. To receive ads, the ad loader’s delegate must conform to the GADNativeAdLoaderDelegate protocol. See GADNativeAd.h.
Declaration
Swift
static let native: GADAdLoaderAdType
Objective-C
extern GADAdLoaderAdType _Nonnull const kGADAdLoaderAdTypeNative
-
An ad size that spans the full width of the application in landscape orientation. The height is typically 32 points on an iPhone/iPod UI, and 90 points tall on an iPad UI.
-
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
Objective-C
extern NSString *const _Nonnull GADCustomEventParametersServer
-
Asset key for the GADMediaView asset view.
Declaration
Swift
let GADCustomNativeAdMediaViewKey: String
Objective-C
extern NSString *const _Nonnull GADCustomNativeAdMediaViewKey
-
Undocumented
Declaration
Swift
static let headlineAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeHeadlineAsset
-
Undocumented
Declaration
Swift
static let callToActionAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeCallToActionAsset
-
Undocumented
Declaration
Swift
static let iconAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeIconAsset
-
Undocumented
Declaration
Swift
static let bodyAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeBodyAsset
-
Undocumented
Declaration
Swift
static let storeAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeStoreAsset
-
Undocumented
Declaration
Swift
static let priceAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativePriceAsset
-
Undocumented
Declaration
Swift
static let imageAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeImageAsset
-
Undocumented
Declaration
Swift
static let starRatingAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeStarRatingAsset
-
Undocumented
Declaration
Swift
static let advertiserAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeAdvertiserAsset
-
Undocumented
Declaration
Swift
static let mediaViewAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeMediaViewAsset
-
Undocumented
Declaration
Swift
static let adChoicesViewAsset: GADNativeAssetIdentifier
Objective-C
GAD_EXTERN GADNativeAssetIdentifier _Nonnull const GADNativeAdChoicesViewAsset
-
Add this constant to the testDevices property’s array to receive test ads on the simulator.
Declaration
Swift
let kGADSimulatorID: AnyObject
Objective-C
extern id _Nonnull const kGADSimulatorID
-
Rating for content suitable for general audiences, including families.
Declaration
Swift
static let general: GADMaxAdContentRating
Objective-C
extern GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingGeneral
-
Rating for content suitable for most audiences with parental guidance.
Declaration
Swift
static let parentalGuidance: GADMaxAdContentRating
Objective-C
extern GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingParentalGuidance
-
Rating for content suitable for teen and older audiences.
Declaration
Swift
static let teen: GADMaxAdContentRating
Objective-C
extern GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingTeen
-
Rating for content suitable only for mature audiences.
Declaration
Swift
static let matureAudience: GADMaxAdContentRating
Objective-C
extern GADMaxAdContentRating _Nonnull const GADMaxAdContentRatingMatureAudience
-
Google AdMob Ads error domain.
Declaration
Swift
let GADErrorDomain: String
Objective-C
extern NSString *const _Nonnull GADErrorDomain
-
Ad network class name for ads returned from Google’s ad network.
Declaration
Swift
let GADGoogleAdNetworkClassName: String
Objective-C
extern NSString *const _Nonnull GADGoogleAdNetworkClassName
-
Ad network class name for custom event ads.
Declaration
Swift
let GADCustomEventAdNetworkClassName: String
Objective-C
extern NSString *const _Nonnull GADCustomEventAdNetworkClassName
-
Key into NSError.userInfo mapping to a GADResponseInfo object. When ads fail to load, errors returned contain an instance of GADResponseInfo.
Declaration
Swift
let GADErrorUserInfoKeyResponseInfo: String
Objective-C
extern NSString *_Nonnull GADErrorUserInfoKeyResponseInfo
-
Add this constant to the testDevices property’s array to receive test ads on the simulator.
Declaration
Swift
let kGAMSimulatorID: AnyObject
Objective-C
extern id _Nonnull const kGAMSimulatorID
-
Project version string for GoogleMobileAds.
Declaration
Objective-C
extern const unsigned char GoogleMobileAdsVersionString[]
-
Undocumented
Declaration
Swift
static let headlineAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeHeadlineAsset
-
Undocumented
Declaration
Swift
static let callToActionAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeCallToActionAsset
-
Undocumented
Declaration
Swift
static let iconAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeIconAsset
-
Undocumented
Declaration
Swift
static let bodyAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeBodyAsset
-
Undocumented
Declaration
Swift
static let storeAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeStoreAsset
-
Undocumented
Declaration
Swift
static let priceAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativePriceAsset
-
Undocumented
Declaration
Swift
static let imageAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeImageAsset
-
Undocumented
Declaration
Swift
static let starRatingAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeStarRatingAsset
-
Undocumented
Declaration
Swift
static let advertiserAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeAdvertiserAsset
-
Undocumented
Declaration
Swift
static let mediaViewAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeMediaViewAsset
-
Undocumented
Declaration
Swift
static let adChoicesViewAsset: GADUnifiedNativeAssetIdentifier
Objective-C
GAD_EXTERN GADUnifiedNativeAssetIdentifier _Nonnull const GADUnifiedNativeAdChoicesViewAsset
-
Google AdMob Ads error domain.
Declaration
Swift
let kGADErrorDomain: String
Objective-C
extern NSString *const _Nonnull kGADErrorDomain