GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADPresentationErrorCode
enum GADPresentationErrorCode : NSInteger {}
Error codes in the Google Mobile Ads SDK domain that surface due to errors when attempting to
present an ad.
-
Ad isn’t ready to be shown.
Declaration
Swift
case codeAdNotReady = 15
Objective-C
GADPresentationErrorCodeAdNotReady = 15
-
Ad is too large for the scene.
Declaration
Swift
case codeAdTooLarge = 16
Objective-C
GADPresentationErrorCodeAdTooLarge = 16
-
Declaration
Swift
case codeInternal = 17
Objective-C
GADPresentationErrorCodeInternal = 17
-
Ad has already been used.
Declaration
Swift
case codeAdAlreadyUsed = 18
Objective-C
GADPresentationErrorCodeAdAlreadyUsed = 18
-
Attempted to present ad from a non-main thread.
Declaration
Swift
case notMainThread = 21
Objective-C
GADPresentationErrorNotMainThread = 21
-
A mediation ad network adapter failed to present the ad. The adapter’s
error is included as an underlyingError.
Declaration
Swift
case mediation = 22
Objective-C
GADPresentationErrorMediation = 22
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADPresentationErrorCode\u003c/code\u003e is an enum representing error codes that can occur when presenting ads within the Google Mobile Ads SDK.\u003c/p\u003e\n"],["\u003cp\u003eThese errors indicate issues such as ad unavailability, incorrect size, internal problems, prior ad usage, threading errors, or mediation failures.\u003c/p\u003e\n"],["\u003cp\u003eEach error code has a corresponding constant value for both Swift and Objective-C.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use these error codes to debug ad presentation issues within their apps.\u003c/p\u003e\n"]]],["The document outlines error codes within the Google Mobile Ads SDK for ad presentation failures. `GADPresentationErrorCode` lists possible errors: `AdNotReady` (15) indicates the ad isn't ready; `AdTooLarge` (16) means the ad is too big; `Internal` (17) signifies an internal SDK issue; `AdAlreadyUsed` (18) shows the ad was already shown; `NotMainThread` (21) happens if presentation isn't from the main thread; `Mediation` (22) suggests failure of a mediation ad network.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADPresentationErrorCode\n========================\n\n enum GADPresentationErrorCode : NSInteger {}\n\nError codes in the Google Mobile Ads SDK domain that surface due to errors when attempting to\npresent an ad.\n- `\n ``\n ``\n `\n\n ### [GADPresentationErrorCodeAdNotReady](#/c:@E@GADPresentationErrorCode@GADPresentationErrorCodeAdNotReady)\n\n `\n ` \n Ad isn't ready to be shown. \n\n #### Declaration\n\n Swift \n\n case codeAdNotReady = 15\n\n Objective-C \n\n GADPresentationErrorCodeAdNotReady = 15\n\n- `\n ``\n ``\n `\n\n ### [GADPresentationErrorCodeAdTooLarge](#/c:@E@GADPresentationErrorCode@GADPresentationErrorCodeAdTooLarge)\n\n `\n ` \n Ad is too large for the scene. \n\n #### Declaration\n\n Swift \n\n case codeAdTooLarge = 16\n\n Objective-C \n\n GADPresentationErrorCodeAdTooLarge = 16\n\n- `\n ``\n ``\n `\n\n ### [GADPresentationErrorCodeInternal](#/c:@E@GADPresentationErrorCode@GADPresentationErrorCodeInternal)\n\n `\n ` \n Internal error. \n\n #### Declaration\n\n Swift \n\n case codeInternal = 17\n\n Objective-C \n\n GADPresentationErrorCodeInternal = 17\n\n- `\n ``\n ``\n `\n\n ### [GADPresentationErrorCodeAdAlreadyUsed](#/c:@E@GADPresentationErrorCode@GADPresentationErrorCodeAdAlreadyUsed)\n\n `\n ` \n Ad has already been used. \n\n #### Declaration\n\n Swift \n\n case codeAdAlreadyUsed = 18\n\n Objective-C \n\n GADPresentationErrorCodeAdAlreadyUsed = 18\n\n- `\n ``\n ``\n `\n\n ### [GADPresentationErrorNotMainThread](#/c:@E@GADPresentationErrorCode@GADPresentationErrorNotMainThread)\n\n `\n ` \n Attempted to present ad from a non-main thread. \n\n #### Declaration\n\n Swift \n\n case notMainThread = 21\n\n Objective-C \n\n GADPresentationErrorNotMainThread = 21\n\n- `\n ``\n ``\n `\n\n ### [GADPresentationErrorMediation](#/c:@E@GADPresentationErrorCode@GADPresentationErrorMediation)\n\n `\n ` \n A mediation ad network adapter failed to present the ad. The adapter's\n error is included as an underlyingError. \n\n #### Declaration\n\n Swift \n\n case mediation = 22\n\n Objective-C \n\n GADPresentationErrorMediation = 22"]]