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
structGADAdLoaderAdType:_ObjectiveCBridgeable,Hashable,Equatable,_SwiftNewtypeWrapper,RawRepresentable
Undocumented
Declaration
Swift
structGADAdMetadataKey:_ObjectiveCBridgeable,Hashable,Equatable,_SwiftNewtypeWrapper,RawRepresentable
A valid GADAdSize is considered to be one of the predefined GADAdSize constants or a GADAdSizeconstructed by GADAdSizeFromCGSize, GADAdSizeFullWidthPortraitWithHeight,GADAdSizeFullWidthLandscapeWithHeight.
Do not create a GADAdSize manually. Use one of the kGADAdSize constants. Treat GADAdSize as anopaque type. Do not access any fields directly. To obtain a concrete CGSize, use the functionCGSizeFromGADAdSize().
A block called with the initialization status when [GADMobileAds startWithCompletionHandler:]completes or times out.
Declaration
Swift
typealiasGADInitializationCompletionHandler=(GADInitializationStatus)->Void
Undocumented
Declaration
Swift
structGADNativeAppInstallAssetID:_ObjectiveCBridgeable,Hashable,Equatable,_SwiftNewtypeWrapper,RawRepresentable
Undocumented
Declaration
Swift
structGADNativeContentAdAssetID:_ObjectiveCBridgeable,Hashable,Equatable,_SwiftNewtypeWrapper,RawRepresentable
Native ad custom click handler block. |assetID| is the ID of asset that has received a click.
Declaration
Swift
typealiasGADNativeAdCustomClickHandler=(String)->Void
Maximum ad content rating.
Declaration
Swift
structGADMaxAdContentRating:_ObjectiveCBridgeable,Hashable,Equatable,_SwiftNewtypeWrapper,RawRepresentable
A block to be executed when the ad request operation completes. If the load failed, the errorobject is non-null and provides failure information. On success, |error| is nil.
Declaration
Swift
typealiasGADRewardedAdLoadCompletionHandler=(GADRequestError?)->Void
Undocumented
Declaration
Swift
structGADUnifiedNativeAssetIdentifier:_ObjectiveCBridgeable,Hashable,Equatable,_SwiftNewtypeWrapper,RawRepresentable
Called by the adapter after loading the banner ad or encountering an error. Returns an adevent object to send ad events to the Google Mobile Ads SDK. The block returns nil if a delegatecouldn’t be created or if the block has already been called.
Declaration
Swift
typealiasGADMediationBannerLoadCompletionHandler=(GADMediationBannerAd?,Error?)->GADMediationBannerAdEventDelegate?Called by the adapter after loading the interstitial ad or encountering an error. Returns anad event delegate to send ad events to the Google Mobile Ads SDK. The block returns nil if adelegate couldn’t be created or if the block has already been called.
Declaration
Swift
typealiasGADMediationInterstitialLoadCompletionHandler=(GADMediationInterstitialAd?,Error?)->GADMediationInterstitialAdEventDelegate?Called by the adapter after loading the native ad or encountering an error. Returns an adevent delegate to send ad events to the Google Mobile Ads SDK. The block returns nil if adelegate couldn’t be created or if the block has already been called.
Declaration
Swift
typealiasGADMediationNativeLoadCompletionHandler=(GADMediationNativeAd?,Error?)->GADMediationNativeAdEventDelegate?Called by the adapter after loading the rewarded ad or encountering an error. Returns an adevent delegate to send ad events to the Google Mobile Ads SDK. The block returns nil if adelegate couldn’t be created or if the block has already been called.
Declaration
Swift
typealiasGADMediationRewardedLoadCompletionHandler=(GADMediationRewardedAd?,Error?)->GADMediationRewardedAdEventDelegate?Executes when adapter set up completes.
Declaration
Swift
typealiasGADMediationAdapterSetUpCompletionBlock=(Error?)->Void
Undocumented
Completion handler for signal generation. Returns either signals or an error object.
Declaration
Swift
typealiasGADRTBSignalCompletionHandler=(String?,Error?)->Void
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.