GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADErrorCode
enum GADErrorCode : NSInteger {}
NSError codes for GAD error domain.
-
The ad request is invalid. The localizedFailureReason error description will have more
details. Typically this is because the ad did not have the ad unit ID or root view
controller set.
Declaration
Swift
case invalidRequest = 0
Objective-C
GADErrorInvalidRequest = 0
-
The ad request was successful, but no ad was returned.
Declaration
Objective-C
GADErrorNoFill = 1
-
There was an error loading data from the network.
Declaration
Swift
case networkError = 2
Objective-C
GADErrorNetworkError = 2
-
The ad server experienced a failure processing the request.
Declaration
Swift
case serverError = 3
Objective-C
GADErrorServerError = 3
-
The current device’s OS is below the minimum required version.
Declaration
Swift
case osVersionTooLow = 4
Objective-C
GADErrorOSVersionTooLow = 4
-
The request was unable to be loaded before being timed out.
Declaration
Objective-C
GADErrorTimeout = 5
-
The mediation response was invalid.
Declaration
Swift
case mediationDataError = 7
Objective-C
GADErrorMediationDataError = 7
-
Error finding or creating a mediation ad network adapter.
Declaration
Swift
case mediationAdapterError = 8
Objective-C
GADErrorMediationAdapterError = 8
-
Attempting to pass an invalid ad size to an adapter.
Declaration
Swift
case mediationInvalidAdSize = 10
Objective-C
GADErrorMediationInvalidAdSize = 10
-
Declaration
Swift
case internalError = 11
Objective-C
GADErrorInternalError = 11
-
Declaration
Swift
case invalidArgument = 12
Objective-C
GADErrorInvalidArgument = 12
-
Will not send request because the ad object has already been used.
Declaration
Swift
case adAlreadyUsed = 19
Objective-C
GADErrorAdAlreadyUsed = 19
-
Will not send request because the application identifier is missing.
Declaration
Swift
case applicationIdentifierMissing = 20
Objective-C
GADErrorApplicationIdentifierMissing = 20
-
Received invalid ad string.
Declaration
Swift
case receivedInvalidAdString = 21
Objective-C
GADErrorReceivedInvalidAdString = 21
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\u003eGADErrorCode\u003c/code\u003e is an enum representing error codes for the Google Mobile Ads SDK (GAD).\u003c/p\u003e\n"],["\u003cp\u003eThese error codes provide specific reasons for failures within the ad request and delivery process, such as invalid requests, network issues, and server errors.\u003c/p\u003e\n"],["\u003cp\u003eMediation-related error codes offer insights into issues encountered with ad network adapters and their responses.\u003c/p\u003e\n"],["\u003cp\u003eSome errors, like \u003ccode\u003eGADErrorAdAlreadyUsed\u003c/code\u003e and \u003ccode\u003eGADErrorApplicationIdentifierMissing\u003c/code\u003e, highlight usage constraints and setup requirements for ad requests.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize these error codes to diagnose and handle ad-related problems in their applications, ensuring a smoother ad experience.\u003c/p\u003e\n"]]],[],null,["# GoogleMobileAds Framework Reference\n\nGADErrorCode\n============\n\n enum GADErrorCode : NSInteger {}\n\nNSError codes for GAD error domain.\n- `\n ``\n ``\n `\n\n ### [GADErrorInvalidRequest](#/c:@E@GADErrorCode@GADErrorInvalidRequest)\n\n `\n ` \n The ad request is invalid. The localizedFailureReason error description will have more\n details. Typically this is because the ad did not have the ad unit ID or root view\n controller set. \n\n #### Declaration\n\n Swift \n\n case invalidRequest = 0\n\n Objective-C \n\n GADErrorInvalidRequest = 0\n\n- `\n ``\n ``\n `\n\n ### [GADErrorNoFill](#/c:@E@GADErrorCode@GADErrorNoFill)\n\n `\n ` \n The ad request was successful, but no ad was returned. \n\n #### Declaration\n\n Swift \n\n case noFill = 1\n\n Objective-C \n\n GADErrorNoFill = 1\n\n- `\n ``\n ``\n `\n\n ### [GADErrorNetworkError](#/c:@E@GADErrorCode@GADErrorNetworkError)\n\n `\n ` \n There was an error loading data from the network. \n\n #### Declaration\n\n Swift \n\n case networkError = 2\n\n Objective-C \n\n GADErrorNetworkError = 2\n\n- `\n ``\n ``\n `\n\n ### [GADErrorServerError](#/c:@E@GADErrorCode@GADErrorServerError)\n\n `\n ` \n The ad server experienced a failure processing the request. \n\n #### Declaration\n\n Swift \n\n case serverError = 3\n\n Objective-C \n\n GADErrorServerError = 3\n\n- `\n ``\n ``\n `\n\n ### [GADErrorOSVersionTooLow](#/c:@E@GADErrorCode@GADErrorOSVersionTooLow)\n\n `\n ` \n The current device's OS is below the minimum required version. \n\n #### Declaration\n\n Swift \n\n case osVersionTooLow = 4\n\n Objective-C \n\n GADErrorOSVersionTooLow = 4\n\n- `\n ``\n ``\n `\n\n ### [GADErrorTimeout](#/c:@E@GADErrorCode@GADErrorTimeout)\n\n `\n ` \n The request was unable to be loaded before being timed out. \n\n #### Declaration\n\n Swift \n\n case timeout = 5\n\n Objective-C \n\n GADErrorTimeout = 5\n\n- `\n ``\n ``\n `\n\n ### [GADErrorMediationDataError](#/c:@E@GADErrorCode@GADErrorMediationDataError)\n\n `\n ` \n The mediation response was invalid. \n\n #### Declaration\n\n Swift \n\n case mediationDataError = 7\n\n Objective-C \n\n GADErrorMediationDataError = 7\n\n- `\n ``\n ``\n `\n\n ### [GADErrorMediationAdapterError](#/c:@E@GADErrorCode@GADErrorMediationAdapterError)\n\n `\n ` \n Error finding or creating a mediation ad network adapter. \n\n #### Declaration\n\n Swift \n\n case mediationAdapterError = 8\n\n Objective-C \n\n GADErrorMediationAdapterError = 8\n\n- `\n ``\n ``\n `\n\n ### [GADErrorMediationInvalidAdSize](#/c:@E@GADErrorCode@GADErrorMediationInvalidAdSize)\n\n `\n ` \n Attempting to pass an invalid ad size to an adapter. \n\n #### Declaration\n\n Swift \n\n case mediationInvalidAdSize = 10\n\n Objective-C \n\n GADErrorMediationInvalidAdSize = 10\n\n- `\n ``\n ``\n `\n\n ### [GADErrorInternalError](#/c:@E@GADErrorCode@GADErrorInternalError)\n\n `\n ` \n Internal error. \n\n #### Declaration\n\n Swift \n\n case internalError = 11\n\n Objective-C \n\n GADErrorInternalError = 11\n\n- `\n ``\n ``\n `\n\n ### [GADErrorInvalidArgument](#/c:@E@GADErrorCode@GADErrorInvalidArgument)\n\n `\n ` \n Invalid argument error. \n\n #### Declaration\n\n Swift \n\n case invalidArgument = 12\n\n Objective-C \n\n GADErrorInvalidArgument = 12\n\n- `\n ``\n ``\n `\n\n ### [GADErrorAdAlreadyUsed](#/c:@E@GADErrorCode@GADErrorAdAlreadyUsed)\n\n `\n ` \n Will not send request because the ad object has already been used. \n\n #### Declaration\n\n Swift \n\n case adAlreadyUsed = 19\n\n Objective-C \n\n GADErrorAdAlreadyUsed = 19\n\n- `\n ``\n ``\n `\n\n ### [GADErrorApplicationIdentifierMissing](#/c:@E@GADErrorCode@GADErrorApplicationIdentifierMissing)\n\n `\n ` \n Will not send request because the application identifier is missing. \n\n #### Declaration\n\n Swift \n\n case applicationIdentifierMissing = 20\n\n Objective-C \n\n GADErrorApplicationIdentifierMissing = 20\n\n- `\n ``\n ``\n `\n\n ### [GADErrorReceivedInvalidAdString](#/c:@E@GADErrorCode@GADErrorReceivedInvalidAdString)\n\n `\n ` \n Received invalid ad string. \n\n #### Declaration\n\n Swift \n\n case receivedInvalidAdString = 21\n\n Objective-C \n\n GADErrorReceivedInvalidAdString = 21"]]