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-02-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-04 UTC."],[[["`GADPresentationErrorCode` is an enum representing error codes that can occur when presenting ads within the Google Mobile Ads SDK."],["These errors indicate issues such as ad unavailability, incorrect size, internal problems, prior ad usage, threading errors, or mediation failures."],["Each error code has a corresponding constant value for both Swift and Objective-C."],["Developers can use these error codes to debug ad presentation issues within their apps."]]],["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"]]