このページでは、iOS 向け Google Mobile Ads SDK の最新バージョンと以前のバージョンの移行について説明します。バージョン 12.0.0 は 2025 年 2 月にリリースされる予定です。
SDK バージョン v11 から v12 に移行する
升级到 Xcode 16.0
支持的最低 Xcode 版本已提升至 16.0。
Swift 命名支持
12.0.0 版进行了一些更改,以遵循 Swift API 设计准则中的命名规范。这些更改仅会影响 Swift。尚未对 Objective-C API 的命名进行任何更改。
类前缀变更
对类前缀进行了以下更改:
- 移除了所有类型的名称中的
GAD
前缀。 - 将
GAM
前缀重命名为AdManager
。 - 将
GADM
前缀重命名为Mediation
。
解决错误
要解决这些更改导致的错误,最好的方法是使用“Fix-it”功能进行更正。
解决命名冲突
如需解决命名冲突,请使用模块提供的命名空间。例如,GADRequest
现在称为 Request
。以下示例为 Google 移动广告 SDK Request
类命名空间:
import GoogleMobileAds
...
var request: GoogleMobileAds.Request?
Swift 变更的详细列表
下表列出了对 Swift API 所做的更改:
版本 11 | 12 版 |
---|---|
GADAdapterInitializationState |
AdapterInitializationState |
GADAdChoicesPosition |
AdChoicesPosition |
GADAdChoicesView |
AdChoicesView |
GADAdFormat |
AdFormat |
GADAdLoader |
AdLoader |
GADAdLoaderAdType |
AdLoaderAdType |
GADAdLoaderDelegate |
AdLoaderDelegate |
GADAdMetadataDelegate |
AdMetadataDelegate |
GADAdMetadataProvider |
AdMetadataProvider |
GADAdNetworkExtras |
AdNetworkExtras |
GADAdNetworkResponseInfo |
AdNetworkResponseInfo |
GADAdReward |
AdReward |
GADAdSize |
AdSize |
GADAdSizeDelegate |
AdSizeDelegate |
GADAdValue |
AdValue |
GADAdValuePrecision |
AdValuePrecision |
GADAppEventDelegate |
AppEventDelegate |
GADAppOpenAd |
AppOpenAd |
GADAppOpenSignalRequest |
AppOpenSignalRequest |
GADAudioVideoManager |
AudioVideoManager |
GADAudioVideoManagerDelegate |
AudioVideoManagerDelegate |
GADBannerSignalRequest |
BannerSignalRequest |
GADBannerView |
BannerView |
GADBannerViewDelegate |
BannerViewDelegate |
GADCustomEventExtras |
CustomEventExtras |
GADCustomEventRequest |
CustomEventRequest |
GADCustomNativeAd |
CustomNativeAd |
GADCustomNativeAdLoaderDelegate |
CustomNativeAdLoaderDelegate |
GADCustomNativeAdDelegate |
CustomNativeAdDelegate |
GADDebugOptionsViewControllerDelegate |
DebugOptionsViewControllerDelegate |
GADDebugOptionsViewController |
DebugOptionsViewController |
GADDisplayAdMeasurement |
DisplayAdMeasurement |
GADExtras |
Extras |
GADFullScreenPresentingAd |
FullScreenPresentingAd |
GADFullScreenContentDelegate |
FullScreenContentDelegate |
GADAdapterStatus |
AdapterStatus |
GADInitializationStatus |
InitializationStatus |
GADInterstitialAd |
InterstitialAd |
GADInterstitialSignalRequest |
InterstitialSignalRequest |
GADMediaAspectRatio |
MediaAspectRatio |
GADMediaContent |
MediaContent |
GADMediaView |
MediaView |
GADMobileAds |
MobileAds |
GADMultipleAdsAdLoaderOptions |
MultipleAdsAdLoaderOptions |
GADMuteThisAdReason |
MuteThisAdReason |
GADNativeAd |
NativeAd |
GADNativeAdLoaderDelegate |
NativeAdLoaderDelegate |
GADNativeAdView |
NativeAdView |
GADNativeAdCustomClickGestureOptions |
NativeAdCustomClickGestureOptions |
GADNativeAdDelegate |
NativeAdDelegate |
GADNativeAdImage |
NativeAdImage |
GADNativeAdImageAdLoaderOptions |
NativeAdImageAdLoaderOptions |
GADNativeAdInlineBehavior |
NativeAdInlineBehavior |
GADNativeAdInlineBehaviorOptions |
NativeAdInlineBehaviorOptions |
GADNativeAdMediaAdLoaderOptions |
NativeAdMediaAdLoaderOptions |
GADNativeAdUnconfirmedClickDelegate |
NativeAdUnconfirmedClickDelegate |
GADNativeAdViewAdOptions |
NativeAdViewAdOptions |
GADNativeMuteThisAdLoaderOptions |
NativeMuteThisAdLoaderOptions |
GADNativeSignalRequest |
NativeSignalRequest |
GADPresentationError |
PresentationError |
GADPublisherPrivacyPersonalizationState |
PublisherPrivacyPersonalizationState |
GADQueryInfo |
QueryInfo |
GADRequest |
Request |
GADRequestError |
RequestError |
GADRequestConfiguration |
RequestConfiguration |
GADResponseInfo |
ResponseInfo |
GADRewardedAd |
RewardedAd |
GADRewardedSignalRequest |
RewardedSignalRequest |
GADRewardedInterstitialAd |
RewardedInterstitialAd |
GADRewardedInterstitialSignalRequest |
RewardedInterstitialSignalRequest |
GADSearchBannerView |
SearchBannerView |
GADServerSideVerificationOptions |
ServerSideVerificationOptions |
GADSignal |
Signal |
GADSignalRequest |
SignalRequest |
GADVersionNumber |
VersionNumber |
GADVideoController |
VideoController |
GADVideoControllerDelegate |
VideoControllerDelegate |
Ad Manager | |
GAMBannerAdLoaderDelegate |
AdManagerBannerAdLoaderDelegate |
GAMBannerView |
AdManagerBannerView |
GAMBannerViewOptions |
AdManagerBannerViewOptions |
GAMInterstitialAd |
AdManagerInterstitialAd |
GAMRequest |
AdManagerRequest |
中介 | |
GADMAdNetworkAdapter |
MediationAdNetworkAdapter |
GADMAdNetworkConnector |
MediationAdNetworkConnector |
GADMBannerAnimationType |
MediationBannerAnimationType |
GADMediatedUnifiedNativeAd |
MediationUnifiedNativeAd |
GADMediatedUnifiedNativeAdNotificationSource |
MediationUnifiedNativeAdNotificationSource |
GADMediationAd |
MediationAd |
GADMediationAdConfiguration |
MediationAdConfiguration |
GADMediationAdEventDelegate |
MediationAdEventDelegate |
GADMediationAdRequest |
MediationAdRequest |
GADMediationAdapter |
MediationAdapter |
GADMediationAppOpenAd |
MediationAppOpenAd |
GADMediationAppOpenAdEventDelegate |
MediationAppOpenAdEventDelegate |
GADMediationBannerAd |
MediationBannerAd |
GADMediationBannerAdConfiguration |
MediationBannerAdConfiguration |
GADMediationBannerAdEventDelegate |
MediationBannerAdEventDelegate |
GADMediationCredentials |
MediationCredentials |
GADMediationInterstitialAd |
MediationInterstitialAd |
GADMediationInterstitialAdConfiguration |
MediationInterstitialAdConfiguration |
GADMediationInterstitialAdEventDelegate |
MediationInterstitialAdEventDelegate |
GADMediationNativeAd |
MediationNativeAd |
GADMediationNativeAdConfiguration |
MediationNativeAdConfiguration |
GADMediationNativeAdEventDelegate |
MediationNativeAdEventDelegate |
GADMediationRewardedAd |
MediationRewardedAd |
GADMediationRewardedAdConfiguration |
MediationRewardedAdConfiguration |
GADMediationRewardedAdEventDelegate |
MediationRewardedAdEventDelegate |
GADMediationServerConfiguration |
MediationServerConfiguration |
实时出价 | |
GADRTBAdapter |
RTBAdapter |
GADRTBMediationSignalsConfiguration |
RTBMediationSignalsConfiguration |
GADRTBRequestParameters |
RTBRequestParameters |
常量
版本 11 | 12 版 |
---|---|
GADAdLoaderAdType.gamBanner |
AdLoaderAdType.adManagerBanner |
GADAdSizeBanner |
AdSizeBanner |
GADAdSizeFluid |
AdSizeFluid |
GADAdSizeFullBanner |
AdSizeFullBanner |
GADAdSizeInvalid |
AdSizeInvalid |
GADAdSizeLargeBanner |
AdSizeLargeBanner |
GADAdSizeLeaderboard |
AdSizeLeaderboard |
GADAdSizeMediumRectangle |
AdSizeMediumRectangle |
GADAdSizeSkyscraper |
AdSizeSkyscraper |
GoogleMobileAdsVersionString |
GoogleMobileAdsVersion |
属性
类型 | 版本 11 | 12 版 |
---|---|---|
GADAdLoader | loading |
isLoading |
GADAudioVideoManager | audioSessionApplicationManaged |
isAudioSessionApplicationManaged |
GADBannerView | autoloadEnabled |
isAutoloadEnabled |
GADMobileAds | sharedInstance |
shared |
applicationMuted |
isApplicationMuted |
|
GADMuteThisAdReason | reasonDescription |
reason |
GADNativeAd | customMuteThisAdAvailable |
isCustomMuteThisAdAvailable |
GADNativeAdCustomClickGestureOptions | tapsAllowed |
areTapsAllowed |
GADNativeAdImageAdLoaderOptions | imageLoadingDisabled |
isImageLoadingDisabled |
GADNativeMuteThisAdLoaderOptions | customMuteThisAdRequested |
isCustomMuteThisAdRequested |
GADNativeSignalRequest | imageLoadingDisabled |
isImageLoadingDisabled |
customMuteThisAdRequested |
isCustomMuteThisAdRequested |
|
GADRequest | neighboringContentURLStrings |
neighboringContentURLs |
GADResponseInfo | extrasDictionary |
extras |
GADServerSideVerificationOptions | customRewardString |
customRewardText |
GADSignal | signalString |
signal |
GADSignalRequest | neighboringContentURLStrings |
neighboringContentURLs |
GADVideoController | customControlsRequested |
areCustomControlsRequested |
clickToExpandEnabled |
isClickToExpandEnabled |
|
GADVideoOptions | startMuted |
shouldStartMuted |
customControlsRequested |
areCustomControlsRequested |
|
clickToExpandRequested |
isClickToExpandRequested |
函数
类型 | 版本 11 | 12 版 |
---|---|---|
GADAdSize | GADPortraitInlineAdaptiveBannerAdSizeWithWidth(_:) |
portraitInlineAdaptiveBanner(width:) |
GADLandscapeInlineAdaptiveBannerAdSizeWithWidth(_:) |
landscapeInlineAdaptiveBanner(width:) |
|
GADCurrentOrientationInlineAdaptiveBannerAdSizeWithWidth(_:) |
currentOrientationInlineAdaptiveBanner(width:) |
|
GADInlineAdaptiveBannerAdSizeWithWidthAndMaxHeight(_:, _:) |
inlineAdaptiveBanner(width:maxHeight:) |
|
GADPortraitAnchoredAdaptiveBannerAdSizeWithWidth(_:) |
portraitAnchoredAdaptiveBanner(width:) |
|
GADLandscapeAnchoredAdaptiveBannerAdSizeWithWidth(_:) |
landscapeAnchoredAdaptiveBanner(width:) |
|
GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(_:) |
currentOrientationAnchoredAdaptiveBanner(width:) |
|
GADAdSizeFromCGSize(_:) |
adSizeFor(cgSize:) |
|
GADAdSizeFullWidthPortraitWithHeight(_:) |
fullWidthPortrait(height:) |
|
GADAdSizeFullWidthLandscapeWithHeight(_:) |
fullWidthLandscape(height:) |
|
GADAdSizeEqualToSize(_:, _:) |
isAdSizeEqualToSize(size1:size2:) |
|
IsGADAdSizeValid(_:) |
isAdSizeValid(size:) |
|
GADAdSizeIsFluid(_:) |
isAdSizeFluid(size:) |
|
CGSizeFromGADAdSize(_:) |
cgSize(for:) |
|
NSStringFromGADAdSize(_:) |
string(for:) |
|
NSValueFromGADAdSize(_:) |
nsValue(for:) |
|
GADAdSizeFromNSValue(_:) |
adSizeFor(nsValue:) |
|
GADClosestValidSizeForAdSizes(_:_:) |
closestValidSizeForAdSizes(original:possibleAdSizes:) |
|
GADAppEventDelegate | adView(_:didReceiveAppEvent:withInfo:) |
adView(_:didReceiveAppEvent:with:) |
interstitialAd(_:didReceiveAppEvent:withInfo:) |
adView(_:didReceiveAppEvent:with:) |
|
GADAppOpenAd | load(withAdResponseString:) |
load(with:) |
load(withAdUnitID:request:completionHandler:) |
load(with:request:completionHandler:) |
|
canPresent(fromRootViewController:) |
canPresent(from:) |
|
present(fromRootViewController:) |
present(from:) |
|
GADBannerView | load(withAdResponseString:) |
load(with:) |
GADInterstitial | load(withAdResponseString:) |
load(with:) |
load(withAdUnitID:request:completionHandler:) |
load(with:request:completionHandler:) |
|
canPresent(fromRootViewController:) |
canPresent(from:) |
|
present(fromRootViewController:) |
present(from:) |
|
GADRewardedAd | load(withAdResponseString:) |
load(with:) |
load(withAdUnitID:request:completionHandler:) |
load(with:request:completionHandler:) |
|
canPresent(fromRootViewController:) |
canPresent(from:) |
|
present(fromRootViewController:userDidEarnRewardHandler:) |
present(from:userDidEarnRewardHandler:) |
|
GADRewardedInterstitialAd | load(withAdResponseString:) |
load(with:) |
load(withAdUnitID:request:completionHandler:) |
load(with:request:completionHandler:) |
|
canPresent(fromRootViewController:) |
canPresent(from:) |
|
present(fromRootViewController:userDidEarnRewardHandler:) |
present(from:userDidEarnRewardHandler:) |
|
GADVersionNumber | GADGetStringFromVersionNumber(_ version: GADVersionNumber) |
string(for:) |
中介 | ||
GADMAdNetworkAdapter | getBannerWith(_:) |
getBanner(with:) |
presentInterstitial(fromRootViewController:) |
presentInterstitial(from:) |
|
getNativeAd(withAdTypes:options:) |
getNativeAd(with:options:) |
|
GADMediatedUnifiedNativeAd | didRecordClickOnAsset(withName:view:viewController:) |
didRecordClickOnAsset(with:view:viewController:) |
GADMediationAdapter | setUpWith(_:completionHandler:) |
setUp(with:completionHandler:) |
GADMediationAdSize | present(fromRootViewController:) |
present(from:) |
GADMediationAppOpenAd | present(fromRootViewController:) |
present(from:) |
GADMediationInterstitialAd | present(fromRootViewController:) |
present(from:) |
GADMediationRewardedAd | present(fromRootViewController:) |
present(from:) |
GAMInterstitialAd | load(withAdManagerAdUnitID:request:completionHandler:) |
load(with:request:completionHandler:) |
用于控制视频静音状态的 API 变更
GADVideoController
上的 isMuted
属性和 setMute:
方法已替换为 muted
属性。
内嵌自适应广告的变更
为了优化空间利用率,内嵌自适应广告最初不会占用框架中的任何空间。现在,使用内嵌自适应广告尺寸调用 CGSizeFromGADAdSize(_:)
会返回 0
高度,直到 Google 移动广告 SDK 返回广告为止。
移除了自定义搜索广告
以下类已移除且无替代项:
GADDynamicHeightSearchBannerView
GADDynamicHeightSearchRequest
GADSearchBannerView
错误代码的更改
以下错误代码已更改:
类 | 备注 |
---|---|
GADErrorMediationNoFill |
错误现在会以 GADErrorNoFill 的形式返回。 |
GADErrorReceivedInvalidResponse |
已替换为 GADErrorReceivedInvalidAdString 。 |
移除了 GADSimulatorID
移除了 GADSimulatorID
。默认情况下,模拟器已处于测试模式。
自定义定位的变化
GADRequest
上的 customTargeting
字典现在使用 Any
(而非 String
)作为值类型。这样,您就可以将数值传递给 API。
对 extras 参数的更改
- 不再支持将
max_ad_content_rating
键传入additionalParameters
。如需设置广告内容分级上限,请参阅广告内容过滤。
v10 から v11 に移行する
最小デプロイ ターゲット
デプロイの最小ターゲットが iOS 12 に引き上げられました。
必要な Xcode バージョン
サポートされている Xcode の最小バージョンが 15.1 に引き上げられました。
iOS 12 での広告配信が停止
Google Mobile Ads SDK バージョン 11.0.0 では、iOS 13 以降を搭載したデバイスでのみ広告が配信されます。
GoogleAppMeasurement の依存関係を削除しました
バージョン 11.0.0 では、GoogleAppMeasurement
の依存関係が削除されました。AdMob のユーザーに関する指標の切り替えボタンを動かしていたこの依存関係は、2024 年初頭に廃止されます。AdMob でユーザーに関する指標を引き続き収集するには、AdMob アプリを Firebase にリンクし、Firebase 向け Google アナリティクス SDK をアプリに統合します。
全画面広告の表示に関する変更
以下の変更は、さまざまな広告フォーマットに影響します。
- アプリの起動
- インタースティシャル
- 特典
- リワード インタースティシャル
-canPresentFromRootViewController:error:
と -presentFromRootViewController:
のビュー コントローラ パラメータは null を許容します。nil が渡された場合、広告はビュー コントローラ階層の最上位のビュー コントローラから表示されます。
削除されたメソッド
次のメソッドは削除されました。
v11.0.0 タイプ | メソッド | メモ |
---|---|---|
GADAppOpenAd | load(withAdUnitID adUnitID: String, request: GADRequest?, orientation: UIInterfaceOrientation) |
代わりに load(withAdUnitID adUnitID: String, request: GADRequest?) を使用してください。 |
GADMediationBannerAdEventDelegate | willBackgroundApplication() |
代替はありません。 |
GADMediationInterstitialAdEventDelegate | willBackgroundApplication() |
代替はありません。 |
GADMediationNativeAdEventDelegate | willBackgroundApplication() |
代替はありません。 |
GADMediationRewardedAdEventDelegate | didRewardUser(with reward: GADAdReward) |
代わりに didRewardUser() を使用してください。 |
GADMediatedUnifiedNativeAdNotificationSource | mediatedNativeAdWillLeaveApplication(_ mediatedNativeAd: GADMediatedUnifiedNativeAd) |
代替はありません。 |
GADRequestConfiguration | setSameAppKeyEnabled(_ enabled: Bool) |
setPublisherFirstPartyIDEnabled(_ enabled: Bool) を代わりに使用してください。
|
tagForUnderAge(ofConsent underAgeOfConsent: Bool) |
代わりに tagForUnderAgeOfConsent プロパティを使用してください。 |
|
tag(forChildDirectedTreatment childDirectedTreatment: Bool) |
代わりに tagForChildDirectedTreatment プロパティを使用してください。 |
削除されたプロパティ
次のプロパティは削除されます。
v11.0.0 クラス | プロパティ | メモ |
---|---|---|
GADMediationAdConfiguration | hasUserLocation | 代替はありません。 |
userLatitude | ||
userLongitude | ||
userLocationAccuracyInMeters | ||
childDirectedTreatment | 代わりに GADMobileAds.sharedInstance.requestConfiguration.tagForChildDirectedTreatment を使用してください。 |
|
GADResponseInfo | adNetworkClassName | 代わりに loadedAdNetworkResponseInfo の adNetworkClassName を使用してください。 |
GADAdFormatUnknown を削除しました
置き換えずに GADAdFormatUnknown
を削除しました。
ロギング SDK バージョンの変更
バージョン 11.0.0 では sdkVersion
が削除されます。Google Mobile Ads SDK のバージョンをログに記録するには、代わりに versionNumber
を使用します。
バージョン 10.0.0
GADMobileAds.sharedInstance().sdkVersion
バージョン 11.0.0
GADGetStringFromVersionNumber(GADMobileAds.sharedInstance().versionNumber)
GADAdLoader エラー処理の変更
バージョン 11.0.0 以降では、GADAdLoader
の delegate
がリクエストされた広告タイプのデリゲート プロトコルに準拠していない場合、GADAdLoader
は広告リクエストを行いません。以前は、広告リクエストの後に失敗していました。
テストの動作の変更
次のプロパティが true
を返す場合の更新された条件を示す表をご覧ください。
クラス | プロパティ |
---|---|
GADMediationAdConfiguration | isTestRequest |
GADCustomEventRequest | isTesting |
v10.0.0 | v11.0.0 |
|
|
v9 から v10 に移行する
iOS 11 での広告配信が停止されます
Google Mobile Ads SDK バージョン 10.0.0 では、iOS 12 以降を搭載したデバイスでのみ広告が配信されます。
Google Mobile Ads SDK バージョン 10.0.0 へのアップグレードによって、iOS 10 と iOS 11 デバイス上でアプリの機能が壊れることはありませんが、広告は配信されなくなります。
ビットコードによるビルドのサポートが終了しました
Google Mobile Ads SDK を統合するには、モバイルアプリでビットコードを無効にする必要があります。
削除された型
タイプ | メモ |
---|---|
GADGender | 代替はありません。 |
GADMRewardBasedVideoAdNetworkAdapterProtocol | ネットワークの選択に関する記事に記載されているすべてのリワード メディエーション アダプタでは、これらのプロトコルの使用が 1 年以上停止しています。 メディエーションとカスタム イベントには、 GADMediationAdapter を使用してください。 |
GADMRewardBasedVideoAdNetworkConnectorProtocol |
削除されたプロパティ
次のプロパティは削除され、代替はありません。
v10.0.0 クラス | プロパティ |
---|---|
GADMediationAdRequest | userBirthday |
userGender | |
userHasLocation | |
userLatitude | |
userLongitude | |
userLocationAccuracyInMeters | |
userLocationDescription | |
GADCustomEventRequest | userHasLocation |
userLatitude | |
userLongitude | |
userLocationAccuracyInMeters | |
userLocationDescription |
v8 から v9 に移行する
iOS 10 で広告配信が停止
Google Mobile Ads SDK バージョン 9.0.0 がサポートする iOS バージョンは iOS 11 以降です。
Google Mobile Ads SDK バージョン 9.0.0 へのアップグレードによって、iOS 10 デバイス上でアプリの機能が壊れることはありませんが、広告は配信されなくなります。
ステータスバー コントロールの適用強化
バージョン 9.0.0 以降、全画面フォーマットの広告を表示する場合は、ステータスバーの表示を広告で制御できるようにアプリを作る必要があります。それができていない場合は、ログにエラー メッセージが表示されます。
アプリ内のビュー コントローラのレイアウトによっては、制御に必要な変更がない場合があります。広告の rootViewController
に childViewControllerForStatusBarHidden
プロパティを設定する必要があるかどうかを検討してください。
adDidPresentFullScreenContent: の名称を adWillPresentFullScreenContent: に変更
動作の変更はありません。デリゲート メソッドは、広告が表示される直前に呼び出されます。そこで、新しいメソッド名ではその機能をわかりやすく反映しました。
GADRequest から Location Setting API を削除
Google が広告をターゲティングする際に位置情報は使われないため、- (void)setLocationWithLatitude:longitude:accuracy:
が GADRequest
から削除されました。第三者広告ネットワークに位置情報を渡す必要がある場合は、サードパーティの API をご利用ください。
カスタム イベント インターフェースのサポート終了
カスタム イベントを使用すると、AdMob メディエーションをご利用の際に、サポート対象広告ネットワーク以外の広告ネットワーク向けのウォーターフォール メディエーションを追加できます。
すべてのカスタム イベント プロトコルはサポートが終了しました。同じ機能を実現するには、代わりに既存の GADMediationAdapter
プロトコルと GADMediationAdEventDelegate
プロトコルを使用してください。この変更により明確性が向上し、以前は利用できなかったリワード広告とインタースクローラー広告用のカスタム イベントを作成できるようになりました。
API
下の表は、バージョン 9.0.0 以降で使うべきカスタム イベント API に対応するメディエーション アダプタ API の一覧です。
v8 | v9 | |
---|---|---|
GADCustomEventBanner GADCustomEventInterstitial GADCustomEventNativeAd |
GADMediationAdapter | GADMediationBannerAd GADMediationInterstitialAd GADMediationInterscrollerAd GADMediationRewardedAd GADMediationNativeAd |
delegate
|
デリゲートは、GADMediationAdapter クラスの個々の読み込み関数の読み込み完了ハンドラによって返されます。 |
|
-init |
-init |
|
-requestBannerAd:parameter: |
-loadBannerForAdConfiguration: |
|
-requestInterstitialAdWith |
-loadInterstitialFor |
|
-requestNativeAdWithParameter:
|
-loadNativeAdFor |
|
なし | -loadInterscrollerAdFor |
|
なし | -loadRewardedAdFor |
|
-presentFromRootViewController:
|
-presentFromViewController: |
|
-handlesUserClicks |
-handlesUserClicks |
|
-handlesUserImpressions |
-handlesUserImpressions |
デリゲート メソッド
下の表は、バージョン 9.0.0 以降で使うべきカスタム イベント デリゲート メソッドに対応するメディエーション広告イベント デリゲート メソッドの一覧です。
v8 | v9 | |
---|---|---|
GADCustomEventBannerDelegate GADCustomEventInterstitialDelegate GADCustomEventNativeAdDelegate |
GADMediationAdEventDelegate | GADMediationAd |
-customEventBanner:didReceiveAd: -customEventInterstitialDidReceiveAd:
|
広告の読み込みステータスは、GADMediationAdapter クラスの個々の読み込み関数の読み込み完了ハンドラに含まれます。 |
|
-customEventBanner:didFailAd: -customEventInterstitial:didFailAd:
|
||
-customEventBannerWasClicked: -customEventInterstitialWasClicked:
|
-reportClick |
|
-customEventBannerWill -customEventInterstitialWill
|
-willPresentFullScreenView |
|
-customEventBannerWill -customEventInterstitialWill
|
-willDismissFullScreenView |
|
-customEventBannerDid -customEventInterstitialDid
|
-didDismissFullScreenView |
|
-customEventBannerWill -customEventInterstitialWill
|
-willBackgroundApplication |
|
viewControllerFor |
-[GADMediationBannerAd view] |
削除または置換されたその他のメソッドと定数
メソッド、定数、プロパティへの変更 | |
---|---|
kGAD- プレフィックス付き定数 |
削除しました。GAD- プレフィックス付き定数を使用してください。 |
GADAdNetworkResponseInfo
|
credentials は削除されました。代わりに adUnitMapping を使用してください。 |
GADCustomNativeAd
|
GADCustomNativeAd の mediaView はサポートが終了しました。代わりに mediaContent を使用してください。 |
GoogleMobileAds の In-App Purchase API |
GoogleMobileAds の inAppPurchase API は削除されました。 |
v7 から v8 に移行する
Google Mobile Ads SDK version 8.0.0 introduces a few major changes as well as some renames and removals of APIs.
Full-screen format API updates
Starting with version 8.0.0, interstitial and rewarded ads share a generic full screen ad style for more consistency. These new full-screen ad APIs have two major distinctions from the version 7 full-screen ad APIs:
Static class method
load
.The previous approach to load/show a full-screen ad is as follows:
- Create an ad object instance and hold a reference to it.
- Assign a delegate that handles load and show callbacks.
- Load an ad.
- Check if ad is loaded using
isReady
. - Show the ad.
In version 8, the approach changes slightly. Load callbacks are no longer part of a delegate. Instead, they're passed into the
load
method as a completion handler:- Call a static load method on the ad class and provide a load completion handler.
- In the load completion callback, keep a reference to the loaded ad that's returned.
- Assign a delegate that handles show callbacks.
- Show the ad.
The new approach provides these benefits:
- You won't ever have a reference to an ad that is not loaded.
- You don't have to hold onto an ad object while it's loading.
Consistent ad events.
Event type Existing API v8 API Load events GADInterstitialDelegate
orGADRewardedAdDelegate
GADInterstitialAdLoadCompletionHandler
orGADRewardedAdLoadCompletionHandler
Presentation events GADFullScreenContentDelegate
Previously, to listen for any ad events, you would register a class that implements the
GADInterstitialDelegate
protocol to an interstitial's delegate property, or register a class that implements theGADRewardedAdDelegate
protocol to a rewarded ad's delegate property depending on which format you're using. This same delegate had methods related to both the loading and presentation life cycle of an ad.With version 8, load and presentation events are separate. You can now register a
GADFullScreenContentDelegate
any time prior to showing an ad instead of being required to set a single delegate prior to loading the ad. Ad load events, which are specific to each format, move to a single load completion handler passed in the load method.
Interstitial
Load ad
The code snippets below show you how to load an interstitial ad and listen for events when the ad succeeds or fails to load.
v7
Swift
import GoogleMobileAds import UIKit class ViewController: UIViewController, GADInterstitialDelegate { var interstitial: GADInterstitial! override func viewDidLoad() { super.viewDidLoad() interstitial = GADInterstitial(adUnitID: "ca-app-pub-3940256099942544/4411468910") interstitial.delegate = self let request = GADRequest() interstitial.load(request) } /// Tells the delegate an ad request succeeded. func interstitialDidReceiveAd(_ ad: GADInterstitial) { print("Interstitial ad loaded.") } /// Tells the delegate an ad request failed. func interstitial(_ ad: GADInterstitial, didFailToReceiveAdWithError error: GADRequestError) { print("Interstitial ad failed to load with error: \(error.localizedDescription)") } }
Objective-C
@import GoogleMobileAds; @import UIKit; @interface ViewController ()@property(nonatomic, strong) GADInterstitial *interstitial; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; self.interstitial = [[GADInterstitial alloc] initWithAdUnitID:@"ca-app-pub-3940256099942544/4411468910"]; self.interstitial.delegate = self; GADRequest *request = [GADRequest request]; [self.interstitial loadRequest:request]; } /// Tells the delegate an ad request succeeded. - (void)interstitialDidReceiveAd:(GADInterstitial *)ad { NSLog(@"Insterstitial ad loaded."); } /// Tells the delegate an ad request failed. - (void)interstitial:(GADInterstitial *)ad didFailToReceiveAdWithError:(GADRequestError *)error { NSLog(@"Interstitial ad failed to load with error: %@", [error localizedDescription]); }
v8
Swift
import GoogleMobileAds import UIKit class ViewController: UIViewController, GADFullScreenContentDelegate { var interstitial: GADInterstitialAd? override func viewDidLoad() { super.viewDidLoad() let request = GADRequest() GADInterstitialAd.load(withAdUnitID:"ca-app-pub-8123415297019784/4985798738", request: request, completionHandler: { (ad, error) in if let error = error { print("Failed to load interstitial ad with error: \(error.localizedDescription)") return } self.interstitial = ad self.interstitial.fullScreenContentDelegate = self } ) } }
Objective-C
@import GoogleMobileAds; @import UIKit; @interface ViewController ()@property(nonatomic, strong) GADInterstitialAd *interstitial; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; GADRequest *request = [GADRequest request]; [GADInterstitialAd loadWithAdUnitID:@"ca-app-pub-3940256099942544/4411468910" request:request completionHandler:^(GADInterstitialAd *ad, NSError *error) { if (error) { NSLog(@"Failed to load interstitial ad with error: %@", [error localizedDescription]); return; } self.interstitial = ad; self.interstitial.fullScreenContentDelegate = self; }]; }
Display ad
v7
Swift
func showInterstitial() { ... if interstitial.isReady { interstitial.present(fromRootViewController: self) } else { print("Ad wasn't ready") } }
Objective-C
- (void)showInterstitial: { ... if (self.interstitial.isReady) { [self.interstitial presentFromRootViewController:self]; } else { NSLog(@"Ad wasn't ready"); } }
v8
Swift
func showInterstitial() { ... if let ad = interstitial { ad.present(fromRootViewController: self) } else { print("Ad wasn't ready") } }
Objective-C
- (void)showInterstitial: { ... if (self.interstitial) { [self.interstitial presentFromRootViewController:self]; } else { NSLog(@"Ad wasn't ready"); } }
Presentation ad events
The code snippets below show you how to handle callbacks for when the ad presents (successfully or unsuccessfully) and when it is dismissed.
v7
Swift
override func viewDidLoad() { super.viewDidLoad() interstitial = GADInterstitial(adUnitID: "ca-app-pub-3940256099942544/4411468910") interstitial.delegate = self ... } /// Tells the delegate that an interstitial will be presented. func interstitialWillPresentScreen(_ ad: GADInterstitial) { print("Interstitial ad will be presented.") } /// Tells the delegate the interstitial is to be animated off the screen. func interstitialWillDismissScreen(_ ad: GADInterstitial) { print("Interstitial ad will be dismissed.") } /// Tells the delegate the interstitial had been animated off the screen. func interstitialDidDismissScreen(_ ad: GADInterstitial) { print("Interstitial ad dismissed.") } /// Tells the delegate that a user click will open another app /// (such as the App Store), backgrounding the current app. /// /// This is not a reliable callback for an ad click event and is removed in /// version 8. If you wish to listen to an ad causing a user to leave the app, /// use applicationWillResignActive: or sceneWillResignActive: instead. func interstitialWillLeaveApplication(_ ad: GADInterstitial) { print("Interstitial ad will leave application.") }
Objective-C
- (void)viewDidLoad { [super viewDidLoad]; self.interstitial = [[GADInterstitial alloc] initWithAdUnitID:"ca-app-pub-3940256099942544/4411468910"]; self.interstitial.delegate = self; ... } /// Tells the delegate that an interstitial will be presented. - (void)interstitialWillPresentScreen:(GADInterstitial *)ad { NSLog(@"Interstitial ad will be presented."); } /// Tells the delegate the interstitial is to be animated off the screen. - (void)interstitialWillDismissScreen:(GADInterstitial *)ad { NSLog(@"Interstitial ad will be dismissed."); } /// Tells the delegate the interstitial had been animated off the screen. - (void)interstitialDidDismissScreen:(GADInterstitial *)ad { NSLog(@"Interstitial ad dismissed."); } /// Tells the delegate that a user click will open another app /// (such as the App Store), backgrounding the current app. /// /// This is not a reliable callback for an ad click event and is removed in /// version 8. If you wish to listen to an ad causing a user to leave the app, /// use applicationWillResignActive: or sceneWillResignActive: instead. - (void)interstitialWillLeaveApplication:(GADInterstitial *)ad { NSLog(@"Interstitial ad will leave application."); }
v8
Swift
override func viewDidLoad() { super.viewDidLoad() let request = GADRequest() GADInterstitialAd.load(withAdUnitID:"ca-app-pub-8123415297019784/4985798738", request: request, completionHandler: { (ad, error) in if let error = error { print(error.localizedDescription) return } self.interstitial = ad self.interstitial.fullScreenContentDelegate = self } ) } func adDidPresentFullScreenContent(_ ad: GADFullScreenPresentingAd) { print("Ad did present full screen content.") } func ad(_ ad: GADFullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) { print("Ad failed to present full screen content with error \(error.localizedDescription).") } func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) { print("Ad did dismiss full screen content.") }
Objective-C
- (void)viewDidLoad { [super viewDidLoad]; GADRequest *request = [GADRequest request]; [GADInterstitialAd loadWithAdUnitID:@"ca-app-pub-3940256099942544/4411468910" request:request completionHandler:^(GADInterstitialAd *ad, NSError *error) { if (error) { NSLog(@"interstitial:didFailToReceiveAdWithError: %@", [error localizedDescription]) return; } self.interstitial = ad; self.interstitial.fullScreenContentDelegate = self; }]; } - (void)adDidPresentFullScreenContent:(id)ad { NSLog(@"Ad did present full screen content."); } - (void)ad:(id )ad didFailToPresentFullScreenContentWithError:(NSError *)error { NSLog(@"Ad failed to present full screen content with error %@.", [error localizedDescription]); } - (void)adDidDismissFullScreenContent:(id )ad { NSLog(@"Ad did dismiss full screen content."); }
Rewarded
Load ad
v7
Swift
import GoogleMobileAds import UIKit class ViewController: UIViewController, GADRewardedAdDelegate { /// The rewarded ad. var rewardedAd: GADRewardedAd? override func viewDidLoad() { super.viewDidLoad() rewardedAd = GADRewardedAd(adUnitID: "ca-app-pub-3940256099942544/1712485313") rewardedAd.delegate = self rewardedAd?.load(GADRequest()) { error in if let error = error { print("Rewarded ad failed to load with error: \(error.localizedDescription)") } else { print("Rewarded ad loaded.") } } } }
Objective-C
@import GoogleMobileAds; @import UIKit; @interface ViewController ()@property(nonatomic, strong) GADRewardedAd *rewardedAd; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; self.rewardedAd = [[GADRewardedAd alloc] initWithAdUnitID:@"ca-app-pub-3940256099942544/1712485313"]; self.rewardedAd.delegate = self; GADRequest *request = [GADRequest request]; [self.rewardedAd loadRequest:request completionHandler:^(GADRequestError * _Nullable error) { if (error) { NSLog(@"Rewarded ad failed to load with error: %@", [error localizedDescription]); } else { NSLog(@"Rewarded ad loaded."); } }]; }
v8
Swift
import GoogleMobileAds import UIKit class ViewController: UIViewController, GADFullScreenContentDelegate { /// The rewarded ad. var rewardedAd: GADRewardedAd? override func viewDidLoad() { super.viewDidLoad() let request = GADRequest() GADRewardedAd.load(withAdUnitID: "ca-app-pub-8123415297019784/9501821136", request: request, completionHandler: { (ad, error) in if let error = error { print("Rewarded ad failed to load with error: \(error.localizedDescription)") return } self.rewardedAd = ad self.rewardedAd?.fullScreenContentDelegate = self } ) } }
Objective-C
@import GoogleMobileAds; @import UIKit; @interface ViewController ()@property(nonatomic, strong) GADRewardedAd *rewardedAd; @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; GADRequest *request = [GADRequest request]; [GADRewardedAd loadWithAdUnitID:@"ca-app-pub-3940256099942544/1712485313" request:request completionHandler:^(GADRewardedAd *ad, NSError *error) { if (error) { NSLog(@"Rewarded ad failed to load with error: %@", [error localizedDescription]); return; } self.rewardedAd = ad; NSLog(@"Rewarded ad loaded."); self.rewardedAd.fullScreenContentDelegate = self; }
Display ad and handle reward
Rewarded ads require you to handle the event when a user earns a reward. With
version 7 of the GADRewardedAd
API, you implement
rewardedAd:userDidEarnReward:
as part of the GADRewardedAdDelegate
protocol.
For version 8, you implement the GADUserDidEarnRewardHandler
in order to
present the ad.
v7
Swift
func showRewardedAd() { ... if rewardedAd.isReady { rewardedAd.present(fromRootViewController: self delegate:self) } else { print("Ad wasn't ready") } } /// Tells the delegate that the user earned a reward. func rewardedAd(_ rewardedAd: GADRewardedAd, userDidEarnReward: GADAdReward) { // TODO: Reward the user. }
Objective-C
- (void)showRewardedAd: { ... if (self.rewardedAd.isReady) { [self.rewardedAd presentFromRootViewController:self delegate:self]; } else { NSLog(@"Ad wasn't ready"); } } /// Tells the delegate that the user earned a reward. - (void)rewardedAd:(GADRewardedAd *)rewardedAd userDidEarnReward:(GADAdReward *)reward { // TODO: Reward the user. }
v8
Swift
func showRewardedAd() { ... if let ad = rewardedAd { ad.present(fromRootViewController: self, userDidEarnRewardHandler: { let reward = ad.adReward // TODO: Reward the user. } ) } else { print("Ad wasn't ready") } }
Objective-C
- (void)showRewardedAd: { ... if (self.rewardedAd) { [self.rewardedAd presentFromRootViewController:self userDidEarnRewardHandler:^ { GADAdReward *reward = self.rewardedAd.adReward; // TODO: Reward the user. }]; } else { NSLog(@"Ad wasn't ready"); } }
Presentation ad events
With the GADRewardedAd
API you pass a GADRewardedAdDelegate
to the method
that presents the ad. With the GADRewardedAd
API, you set a
GADFullscreenContentDelegate
as a property on the ad prior to presenting the
ad.
v7
Swift
func showRewardedAd() { ... if rewardedAd.isReady { rewardedAd.present(fromRootViewController: self delegate:self) } else { print("Ad wasn't ready") } } /// Tells the delegate that the rewarded ad was presented. func rewardedAdDidPresent(_ rewardedAd: GADRewardedAd) { print("Rewarded ad presented.") } /// Tells the delegate that the rewarded ad was dismissed. func rewardedAdDidDismiss(_ rewardedAd: GADRewardedAd) { print("Rewarded ad dismissed.") } /// Tells the delegate that the rewarded ad failed to present. func rewardedAd(_ rewardedAd: GADRewardedAd, didFailToPresentWithError error: Error) { print("Rewarded ad failed to present with error: \(error.localizedDescription).") }
Objective-C
- (void)showRewardedAd: { ... if (self.rewardedAd.isReady) { [self.rewardedAd presentFromRootViewController:self delegate:self]; } else { NSLog(@"Ad wasn't ready"); } } /// Tells the delegate that the rewarded ad was presented. - (void)rewardedAdDidPresent:(GADRewardedAd *)rewardedAd { NSLog(@"Rewarded ad presented."); } /// Tells the delegate that the rewarded ad failed to present. - (void)rewardedAd:(GADRewardedAd *)rewardedAd didFailToPresentWithError:(NSError *)error { NSLog(@"Rewarded ad failed to present with error: %@", [error localizedDescription]); } /// Tells the delegate that the rewarded ad was dismissed. - (void)rewardedAdDidDismiss:(GADRewardedAd *)rewardedAd { NSLog(@"Rewarded ad dismissed."); }
v8
Swift
override func viewDidLoad() { super.viewDidLoad() let request = GADRequest() GADRewardedAd.load(withAdUnitID: "ca-app-pub-8123415297019784/9501821136", request: request, completionHandler: { (ad, error) in if let error = error { print(error.localizedDescription) return } self.rewardedAd = ad self.rewardedAd?.fullScreenContentDelegate = self } ) } /// Tells the delegate that the rewarded ad was presented. func adDidPresentFullScreenContent(_ ad: GADFullScreenPresentingAd) { print("Rewarded ad presented.") } /// Tells the delegate that the rewarded ad was dismissed. func adDidDismissFullScreenContent(_ ad: GADFullScreenPresentingAd) { print("Rewarded ad dismissed.") } /// Tells the delegate that the rewarded ad failed to present. func ad(_ ad: GADFullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) { print("Rewarded ad failed to present with error: \(error.localizedDescription).") }
Objective-C
- (void)viewDidLoad { [super viewDidLoad]; GADRequest *request = [GADRequest request]; [GADRewardedAd loadWithAdUnitID:@"ca-app-pub-3940256099942544/1712485313" request:request completionHandler:^(GADRewardedAd *ad, NSError *error) { if (error) { NSLog(@"Rewarded ad failed to load with error: %@", [error localizedDescription]); return; } self.rewardedAd = ad; NSLog(@"Rewarded ad loaded."); self.rewardedAd.fullScreenContentDelegate = self; } /// Tells the delegate that the rewarded ad was presented. - (void)adDidPresentFullScreenContent:(id)ad { NSLog(@"Rewarded ad presented."); } /// Tells the delegate that the rewarded ad failed to present. - (void)ad:(id )ad didFailToPresentFullScreenContentWithError:(NSError *)error { NSLog(@"Rewarded ad failed to present with error: %@", [error localizedDescription]); } /// Tells the delegate that the rewarded ad was dismissed. - (void)adDidDismissFullScreenContent:(id )ad { NSLog(@"Rewarded ad dismissed."); }
Legacy GADRewardedBasedVideoAd API removal
The newer
GADRewardedAd
API was first introduced back in March 2019 and has been the preferred rewarded
API for over 18 months. It has had more enhancements compared to the legacy
GADRewardedBasedVideoAd
API, including the ability to load more than one
rewarded ad at a time.
The legacy GADRewardedBasedVideoAd
API is removed in SDK version 8.0.0.
Smart banner deprecation in favor of adaptive banner
Smart banner ads are deprecated in favor of adaptive banner ads. Adaptive banners provide superior performance and more flexibility in setting ad width. If you prefer to continue using full-width banners, that can still be done using adaptive banner, as shown in the following code snippet:
Swift
class ViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) // Note: The safe area is not known until viewWillAppear. let adSize = getFullWidthAdaptiveAdSize() } func getFullWidthAdaptiveAdSize() -> GADAdSize { // Here safe area is taken into account, hence the view frame is used after the // view has been laid out. let frame = { () -> CGRect in if #available(iOS 11.0, *) { return view.frame.inset(by: view.safeAreaInsets) } else { return view.frame } }() return GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(frame.size.width) } }
Objective-C
@implementation ViewController - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // Note: The safe area is not known until viewWillAppear. GADAdSize adSize = [self getFullWidthAdaptiveAdSize]; } - (GADAdSize)getFullWidthAdaptiveAdSize { CGRect frame = self.view.frame; // Here safe area is taken into account, hence the view frame is used after // the view has been laid out. if (@available(iOS 11.0, *)) { frame = UIEdgeInsetsInsetRect(self.view.frame, self.view.safeAreaInsets); } return GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(frame.size.width); } @end
Leave application callback removal
The willLeaveApplication
callback for all ad formats has been
removed in favor of the
applicationDidEnterBackground:
and
sceneDidEnterBackground:
methods. Using OS-level APIs notify you whenever users leave your app, regardless of
whether or not it is due to an ad interaction.
Note that the willLeaveApplication
callback was never intended to be
an ad click handler, and relying on this callback to report clicks did not
produce an accurate metric. For example, a click on the AdChoices
icon that launched an external browser invoked the callback but did not count a
click.
Class renames
The table below lists specific class names that have changed or been removed in version 8. In summary:
- All classes related to
GADUnifiedNativeAd
have been renamed toGADNativeAd
. GADRewardBasedVideoAd
,GADNativeExpressAdView
, andGADInstreamAd
have been removed.- All classes with the
DFP
prefix have been replaced with aGAM
prefix.
v7.68.0 Class | v8.0.0 Class |
---|---|
DFPBannerView | GAMBannerView |
DFPBannerViewOptions | GAMBannerViewOptions |
DFPInterstitial | GAMInterstitialAd |
DFPRequest | GAMRequest |
GADRequestError | NSError |
GADUnifiedNativeAdView | GADNativeAdView |
GADUnifiedNativeAd | GADNativeAd |
GADUnifiedNativeAdAssetIdentifiers | GADNativeAdAssetIdentifiers |
GADUnifiedNativeAdDelegate | GADNativeAdDelegate |
GADUnifiedNativeAdUnconfirmedClickDelegate | GADNativeAdUnconfirmedClickDelegate |
GADNativeCustomTemplateAd | GADCustomNativeAd |
GADNativeCustomTemplateAdLoaderDelegate | GADCustomNativeAdLoaderDelegate |
GADNativeAdDelegate | GADCustomNativeAdDelegate |
GADInAppPurchase | Removed |
GADInterstitial | GADInterstitialAd |
GADNativeExpressAdView | Removed |
GADRewardBasedVideoAd | Removed |
GADInstreamAd | Removed |
GADInstreamAdView | Removed |
Methods removed/replaced
The table below lists the specific changes in version 8. In summary:
- Previously deprecated methods and properties have been removed.
-willLeaveApplication:
delegate methods have been removed for all formats.- The ad network class name has moved to the
GADResponseInfo
property. - The test device identifier has moved to the
GADRequestConfiguration
property.
v7.68.0 Class | v7.68.0 API | v8.0.0 API | Notes |
---|---|---|---|
GADMobileAds | +configureWithApplicationID: | -startWithCompletionHandler: | The app ID is now set in Info.plist. |
+disableAutomatedInApp |
-disableAutomatedInApp |
||
+disableSDKCrashReporting | -disableSDKCrashReporting | ||
GADRequest | testDevices | GADRequestConfiguration |
The testDeviceIdentifiers property applies to all ad requests, while the old testDevices property was set per-request. |
gender | Removed | ||
birthday | Removed | ||
+sdkVersion | GADMobileAds.sharedInstance |
||
-setBirthday |
Removed | ||
-setLocationWithDescription: | -setLocationWith |
||
-tagForChildDirectedTreatment: | [GADMobileAds.sharedInstance.requestConfiguration tagForChildDirectedTreatment] | ||
GADErrorCode | kGADError* | GADError* | The k prefix is dropped from all error code constants.
|
GADBannerView | hasAutoRefreshed | autoloadEnabled | |
inAppPurchaseDelegate | Removed | ||
mediatedAdView | Removed | ||
adNetworkClassName | responseInfo |
||
DFPBannerView | -setValidAdSizesWithSizes: | -setValidAdSizes: | |
DFPBannerViewOptions | -adSizeDelegate | Removed | |
GADBannerViewDelegate | -adViewDidReceiveAd: | -bannerViewDidReceiveAd: | |
-adView:didFailToReceive |
-bannerView:didFailToReceive |
||
-adViewWillPresentScreen: | -bannerViewWillPresentScreen: | ||
-adViewWillDismissScreen: | -bannerViewWillDismissScreen: | ||
-adViewDidDismissScreen: | -bannerViewDidDismissScreen: | ||
-adViewWillLeaveApplication: | Removed | ||
GADNativeCustomTemplateAd | templateID | GADCustomNativeAd.formatID | |
-performClickOnAssetWithKey: |
-performClickOnAssetWithKey: | ||
GADNativeAdImageAd |
preferredImageOrientation | GADNativeAdMediaAdOptions |
|
GADInterstitial | inAppPurchaseDelegate | Removed | |
isReady | Removed | Use canPresentFrom |
|
hasBeenUsed | Removed | ||
-init | -initWithAdUnitID: | ||
-setAdUnitID: | -initWithAdUnitID: | ||
adNetworkClassName | responseInfo |
||
-interstitialWill |
Removed | ||
GADUnifiedNativeAd | videoController | mediaContent.videoController | |
adNetworkClassName | responseInfo |