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 errors that can occur when presenting ads in the Google Mobile Ads SDK.\u003c/p\u003e\n"],["\u003cp\u003eThese errors can include scenarios like the ad not being ready, being too large for the display, or having already been used.\u003c/p\u003e\n"],["\u003cp\u003eInternal errors and issues stemming from mediation ad networks are also covered by this error enum.\u003c/p\u003e\n"],["\u003cp\u003eEach error code has a corresponding integer value and is available in both Swift and Objective-C.\u003c/p\u003e\n"],["\u003cp\u003eAd presentation attempts made from threads other than the main thread will result in a \u003ccode\u003eGADPresentationErrorNotMainThread\u003c/code\u003e error.\u003c/p\u003e\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"]]