To discuss and provide feedback on our products, join the official AdMob Discord channel in the Google Advertising and Measurement Community server.

GoogleMobileAds Framework Reference

  • GADPresentationErrorCode defines error codes related to ad presentation in the Google Mobile Ads SDK.

  • Errors include issues like the ad not being ready, the ad being too large, internal problems, the ad already being used, presenting from a non-main thread, or mediation network failures.

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

    static var codeAdNotReady: PresentationError.Code { get }

    Objective-C

    GADPresentationErrorCodeAdNotReady = 15
  • Ad is too large for the scene.

    Declaration

    Swift

    static var codeAdTooLarge: PresentationError.Code { get }

    Objective-C

    GADPresentationErrorCodeAdTooLarge = 16
  • Internal error.

    Declaration

    Swift

    static var codeInternal: PresentationError.Code { get }

    Objective-C

    GADPresentationErrorCodeInternal = 17
  • Ad has already been used.

    Declaration

    Swift

    static var codeAdAlreadyUsed: PresentationError.Code { get }

    Objective-C

    GADPresentationErrorCodeAdAlreadyUsed = 18
  • Attempted to present ad from a non-main thread.

    Declaration

    Swift

    static var notMainThread: PresentationError.Code { get }

    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

    static var mediation: PresentationError.Code { get }

    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年11月07日 UTC.