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.
[[["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-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 indicate issues encountered during ad requests, such as invalid requests, network problems, server errors, or mediation failures.\u003c/p\u003e\n"],["\u003cp\u003eEach error code has a corresponding integer value and a detailed description explaining the cause of the error.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use these error codes to troubleshoot and handle ad-related issues in their applications.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003elocalizedFailureReason\u003c/code\u003e property of the \u003ccode\u003eNSError\u003c/code\u003e object provides further information about the error.\u003c/p\u003e\n"]]],["GADErrorCode defines error codes within the GAD error domain, for both Swift and Objective-C. Key errors include: invalid request (0), no ad fill (1), network (2), server (3), and OS version issues (4). Others are: timeout (5), mediation data error (7), adapter error (8), invalid ad size (10), internal error (11), invalid argument (12), ad already used (19), missing app ID (20), and invalid ad string received (21). Each code represents a specific issue.\n"],null,["GADErrorCode \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 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 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 The ad request was successful, but no ad was returned. \n\n Declaration \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 There was an error loading data from the network. \n\n Declaration \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 The ad server experienced a failure processing the request. \n\n Declaration \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 The current device's OS is below the minimum required version. \n\n Declaration \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 The request was unable to be loaded before being timed out. \n\n Declaration \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 The mediation response was invalid. \n\n Declaration \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 Error finding or creating a mediation ad network adapter. \n\n Declaration \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 Attempting to pass an invalid ad size to an adapter. \n\n Declaration \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 Internal error. \n\n Declaration \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 Invalid argument error. \n\n Declaration \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 Will not send request because the ad object has already been used. \n\n Declaration \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 Will not send request because the application identifier is missing. \n\n Declaration \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 Received invalid ad string. \n\n Declaration \n Swift \n\n case receivedInvalidAdString = 21\n\n Objective-C \n\n GADErrorReceivedInvalidAdString = 21"]]