AI-generated Key Takeaways
-
GADErrorCode
is an enum representing error codes for the Google Mobile Ads SDK (GAD). -
These error codes provide specific reasons for failures within the ad request and delivery process, such as invalid requests, network issues, and server errors.
-
Mediation-related error codes offer insights into issues encountered with ad network adapters and their responses.
-
Some errors, like
GADErrorAdAlreadyUsed
andGADErrorApplicationIdentifierMissing
, highlight usage constraints and setup requirements for ad requests. -
Developers can utilize these error codes to diagnose and handle ad-related problems in their applications, ensuring a smoother ad experience.
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
Swift
case noFill = 1
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
Swift
case timeout = 5
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
-
Internal error.
Declaration
Swift
case internalError = 11
Objective-C
GADErrorInternalError = 11
-
Invalid argument error.
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