AdmobError
import type { AdmobError } from 'nitro-ui-admob'
An error reported by the Google Mobile Ads SDK, passed to onAdFailedToShow and onAdFailedToLoad.
| Field | Type | Description |
|---|---|---|
code | string | The numeric GADErrorCode as a string on iOS, the SDK ErrorCode name on Android, or initialization-failed when the SDK could not start. |
message | string | A description of the error from the SDK. |
Codes
code | Platform | Where |
|---|---|---|
Numeric, such as "1" | iOS | onAdFailedToShow, onAdFailedToLoad, load() rejections |
SDK ErrorCode name | Android | onAdFailedToShow, onAdFailedToLoad, load() rejections |
initialization-failed | Both | onAdFailedToLoad of a banner when the SDK could not start |
Thrown errors
These are Errors, not AdmobError objects:
| Thrown by | Message |
|---|---|
load() | "<code>: <message>", with the same code as above. |
load(), Admob.initialize() | The missing app ID message; see native setup. |
show() | This ad was already shown. Load a new ad. |
show() | This ad expired. Load a new ad. |
Guide: errors and troubleshooting.