@maccesar/titools 5.1.1 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CONTRIBUTING.md +69 -0
  2. package/README.md +112 -72
  3. package/agents/ti-pro.md +5 -1
  4. package/commands/ti-audit.md +5 -1
  5. package/docs/examples.md +91 -0
  6. package/docs/knowledge-index.md +57 -0
  7. package/lib/config.js +2 -0
  8. package/lib/downloader.js +1 -1
  9. package/package.json +4 -2
  10. package/skills/purgetss/references/multi-density-images.md +1 -1
  11. package/skills/ti-admob-unified/SKILL.md +58 -0
  12. package/skills/ti-admob-unified/agents/openai.yaml +4 -0
  13. package/skills/ti-admob-unified/assets/example/app.js +1207 -0
  14. package/skills/ti-admob-unified/assets/example/lib/ads.js +646 -0
  15. package/skills/ti-admob-unified/assets/example/library-usage.js +136 -0
  16. package/skills/ti-admob-unified/references/api-reference.md +615 -0
  17. package/skills/ti-admob-unified/references/banners.md +435 -0
  18. package/skills/ti-admob-unified/references/contributing.md +233 -0
  19. package/skills/ti-admob-unified/references/dependencies.md +91 -0
  20. package/skills/ti-admob-unified/references/fullscreen.md +238 -0
  21. package/skills/ti-admob-unified/references/game-monetization.md +148 -0
  22. package/skills/ti-admob-unified/references/getting-started.md +319 -0
  23. package/skills/ti-admob-unified/references/index.md +33 -0
  24. package/skills/ti-admob-unified/references/integration.md +87 -0
  25. package/skills/ti-admob-unified/references/library.md +220 -0
  26. package/skills/ti-admob-unified/references/mediation-parity.md +17 -0
  27. package/skills/ti-admob-unified/references/mediation.md +145 -0
  28. package/skills/ti-admob-unified/references/migration.md +259 -0
  29. package/skills/ti-admob-unified/references/module-changelog.md +84 -0
  30. package/skills/ti-admob-unified/references/module-license.txt +21 -0
  31. package/skills/ti-admob-unified/references/privacy.md +281 -0
  32. package/skills/ti-admob-unified/references/production.md +67 -0
  33. package/skills/ti-admob-unified/references/rewarded-interstitial.md +101 -0
  34. package/skills/ti-admob-unified/references/roadmap.md +143 -0
  35. package/skills/ti-admob-unified/references/source-notes.md +80 -0
  36. package/skills/ti-admob-unified/references/source-snapshot.json +644 -0
  37. package/skills/ti-admob-unified/references/third-party-notices.md +22 -0
  38. package/skills/ti-game/SKILL.md +31 -5
  39. package/skills/ti-game/references/api.md +36 -24
  40. package/skills/ti-game/references/debugging-performance.md +22 -7
  41. package/skills/ti-game/references/examples.md +113 -20
  42. package/skills/ti-game/references/input.md +101 -0
  43. package/skills/ti-game/references/patterns.md +56 -10
  44. package/skills/ti-game/references/physics.md +530 -0
  45. package/skills/ti-game/references/project-setup.md +131 -47
  46. package/skills/ti-game/references/recipes-action.md +149 -18
  47. package/skills/ti-game/references/recipes-adventure-effects.md +47 -4
  48. package/skills/ti-game/references/roadmap.md +11 -4
  49. package/skills/ti-game/references/source-notes.md +81 -0
  50. package/skills/ti-game/references/tilemaps.md +13 -4
  51. package/skills/ti-game-assets/SKILL.md +53 -0
  52. package/skills/ti-game-assets/agents/openai.yaml +4 -0
  53. package/skills/ti-game-assets/references/alpha.md +26 -0
  54. package/skills/ti-game-assets/references/art-direction.md +37 -0
  55. package/skills/ti-game-assets/references/integration.md +49 -0
  56. package/skills/ti-game-assets/references/manifest.example.json +429 -0
  57. package/skills/ti-game-assets/references/manifest.md +39 -0
  58. package/skills/ti-game-assets/references/offline-audio.md +33 -0
  59. package/skills/ti-game-assets/references/prompts.md +33 -0
  60. package/skills/ti-game-assets/references/repeating-textures.md +17 -0
  61. package/skills/ti-game-assets/references/responsible-ads.md +31 -0
  62. package/skills/ti-game-assets/references/sound-assets.md +42 -0
  63. package/skills/ti-game-assets/references/vector-sources.md +21 -0
  64. package/skills/ti-game-assets/scripts/alpha_tools.py +160 -0
  65. package/skills/ti-game-assets/scripts/requirements.txt +1 -0
  66. package/skills/ti-game-assets/scripts/validate_manifest.py +267 -0
  67. package/skills/ti-synthengine/SKILL.md +77 -67
  68. package/skills/ti-synthengine/assets/example/README.md +84 -0
  69. package/skills/ti-synthengine/assets/example/app.js +1178 -0
  70. package/skills/ti-synthengine/assets/example/lib/sequenceOwner.js +83 -0
  71. package/skills/ti-synthengine/assets/example/lib/sequenceScore.js +25 -0
  72. package/skills/ti-synthengine/references/advanced-examples.md +174 -0
  73. package/skills/ti-synthengine/references/android-sim80-correction-evidence.zip +0 -0
  74. package/skills/ti-synthengine/references/android-sim80-correction.json +162 -0
  75. package/skills/ti-synthengine/references/api.md +573 -153
  76. package/skills/ti-synthengine/references/audio-engine.md +272 -124
  77. package/skills/ti-synthengine/references/bypass-physical-recheck-evidence.zip +0 -0
  78. package/skills/ti-synthengine/references/examples.md +355 -106
  79. package/skills/ti-synthengine/references/frontier-android-evidence.zip +0 -0
  80. package/skills/ti-synthengine/references/frontier-ipad-evidence.zip +0 -0
  81. package/skills/ti-synthengine/references/frontier-physical-validation.json +1918 -0
  82. package/skills/ti-synthengine/references/guide.md +426 -75
  83. package/skills/ti-synthengine/references/performance-review-evidence.zip +0 -0
  84. package/skills/ti-synthengine/references/performance-review.json +1146 -0
  85. package/skills/ti-synthengine/references/physical-validation.json +1457 -0
  86. package/skills/ti-synthengine/references/recipes-interaction.md +549 -0
  87. package/skills/ti-synthengine/references/recipes.md +434 -420
  88. package/skills/ti-synthengine/references/recommendations.md +72 -85
  89. package/skills/ti-synthengine/references/sound-design.md +375 -155
  90. package/skills/ti-synthengine/references/source-notes.md +109 -0
  91. package/skills/ti-synthengine/references/source-snapshot.json +452 -0
  92. package/skills/ti-synthengine/references/stats-performance.json +2992 -0
  93. package/skills/ti-synthengine/references/stats-performance.md +82 -0
  94. package/skills/ti-synthengine/references/studio-validation.json +6202 -0
  95. package/skills/ti-synthengine/references/troubleshooting.md +123 -78
  96. package/skills/ti-synthengine/references/unified-bypass-performance.json +22425 -0
  97. package/skills/ti-synthengine/references/unified-validation.json +314 -0
  98. package/AGENTS-VERCEL-RESEARCH.md +0 -175
@@ -0,0 +1,615 @@
1
+ > Source snapshot: official ti.admob.unified 1.0.0 documentation at release source commit `034843299b2984253988e0ffccb9f6a1c91682c9` (copied 2026-10-24). Relative links rebased for this skill.
2
+
3
+ # API reference
4
+
5
+ This page documents the JavaScript surface exported by `ti.admob.unified` `1.0.0`.
6
+
7
+ ```js
8
+ const Admob = require('ti.admob.unified')
9
+ ```
10
+
11
+ <!-- TOC-START -->
12
+ ## Contents
13
+
14
+ - [Module methods](#module-methods)
15
+ - [Deprecated module methods](#deprecated-module-methods)
16
+ - [Banner proxy](#banner-proxy)
17
+ - [Fullscreen proxy](#fullscreen-proxy)
18
+ - [Fullscreen configuration changes](#fullscreen-configuration-changes)
19
+ - [Module events](#module-events)
20
+ - [Constants](#constants)
21
+ - [Mediation diagnostics](#mediation-diagnostics)
22
+ - [Reserved and unavailable APIs](#reserved-and-unavailable-apis)
23
+ - [Consent compatibility payloads](#consent-compatibility-payloads)
24
+
25
+ <!-- TOC-END -->
26
+
27
+ ## Module methods
28
+
29
+ | Method | Platforms | Status |
30
+ | ------------------------------------------ | ------------ | -------------------------- |
31
+ | `initialize(config)` | iOS, Android | Supported |
32
+ | `requestConsent(config)` | iOS, Android | Supported |
33
+ | `canRequestAds()` | iOS, Android | Supported |
34
+ | `isPrivacyOptionsRequired()` | iOS, Android | Supported |
35
+ | `presentPrivacyOptions(config)` | iOS, Android | Supported |
36
+ | `resetConsent()` | iOS, Android | Testing only |
37
+ | `getTrackingAuthorizationStatus()` | iOS, Android | Read-only ATT snapshot |
38
+ | `requestTrackingAuthorization()` | iOS, Android | Portable |
39
+ | `openAdInspector()` | iOS, Android | Development diagnostic |
40
+ | `createBanner(config)` | iOS, Android | Supported |
41
+ | `getAnchoredAdaptiveBannerSize(widthInDp)` | iOS, Android | Collapsed placement size |
42
+ | `createAdaptiveBanner(config)` | iOS, Android | Supported |
43
+ | `createInterstitial(config)` | iOS, Android | Supported |
44
+ | `createRewarded(config)` | iOS, Android | Supported |
45
+ | `createRewardedInterstitial(config)` | iOS, Android | Supported |
46
+ | `createAppOpen(config)` | iOS, Android | Supported |
47
+ | `setTestDevice(deviceId)` | iOS, Android | Compatibility utility |
48
+ | `isTestDevice()` | iOS, Android | Supported |
49
+ | `setAppVolume(volume)` | iOS, Android | Available |
50
+ | `getMediationStatus()` | iOS, Android | Supported diagnostic |
51
+ | `canShowAds()` | iOS, Android | Deprecated alias |
52
+ | `canShowPersonalizedAds()` | iOS, Android | Deprecated; always `false` |
53
+ | `isGDPR()` | iOS, Android | Deprecated diagnostic |
54
+
55
+ See [Mediation diagnostics](#mediation-diagnostics) for adapter status and the [migration guide](migration.md#generic-mediation-diagnostics) for removed pre-release helpers.
56
+
57
+ ### `initialize(config)`
58
+
59
+ Sets global request options and initializes Google Mobile Ads.
60
+
61
+ ```js
62
+ Admob.initialize({
63
+ testDeviceIds: ['GMA_TEST_DEVICE_ID'],
64
+ ageRestrictedTreatment: Admob.AGE_RESTRICTED_TREATMENT_UNSPECIFIED,
65
+ maxAdContentRating: Admob.MAX_AD_CONTENT_RATING_PARENTAL_GUIDANCE
66
+ })
67
+ ```
68
+
69
+ On Android, native request configuration and SDK initialization run on a worker thread; completion is delivered on the UI thread. The call returns before adapter initialization finishes. Wait for `module_initialized` before loading ads.
70
+
71
+ Accepted properties:
72
+
73
+ | Property | Type | Description |
74
+ | ------------------------------ | -------- | ------------------------------------------------------------------------------ |
75
+ | `testDeviceIds` | String[] | Google Mobile Ads test-device identifiers. |
76
+ | `ageRestrictedTreatment` | String | `child`, `teen`, or `unspecified` constant value. |
77
+ | `maxAdContentRating` | String | `G`, `PG`, `T`, or `MA` constant value. |
78
+ | `tagForChildDirectedTreatment` | Boolean | Deprecated compatibility input. |
79
+ | `tagForUnderAgeOfConsent` | Boolean | Deprecated initialization input, separate from the UMP property. |
80
+ | `disableMediation` | Boolean | Optional session exception; defaults to `false`. Skips adapter initialization. |
81
+
82
+ It emits `module_initialized`. Calls are idempotent and the first accepted configuration wins. Always pass an object, even when empty.
83
+
84
+ #### Automatic adapter discovery
85
+
86
+ Google Mobile Ads discovers adapters installed through the selected `ti.admob.unified.mediation.<network>` entries in `tiapp.xml`. The same initialization works with the core alone or with configured complements:
87
+
88
+ ```js
89
+ Admob.initialize({})
90
+ ```
91
+
92
+ With only the core, there are no third-party adapters to initialize. With complements, configure the provider accounts and AdMob source mappings; no `enableMediation` flag or manual provider initialization is needed. Detection does not prove valid credentials, successful initialization or ad delivery.
93
+
94
+ An installed adapter with incomplete configuration can delay the initialization callback until it responds or times out. A previously measured Android launch took `30,755 ms`, including a Liftoff Monetize initialization timeout. Automatic discovery does not fix missing or conflicting provider configuration. See [configuration failures](mediation.md#missing-configuration-and-startup-errors).
95
+
96
+ Use the exception only when adapters are installed but the application deliberately does not use mediation during this session:
97
+
98
+ ```js
99
+ Admob.initialize({ disableMediation: true })
100
+ ```
101
+
102
+ This calls Google's global initialization switch on [Android](https://developers.google.com/admob/android/reference/com/google/android/gms/ads/MobileAds) and [iOS](https://developers.google.com/admob/ios/api/reference/Classes/GADMobileAds), before SDK startup. It skips adapter initialization globally; it does not remove dependencies, validate credentials, select individual networks or provide an ad-source allowlist. Do not set it in an app that intends to serve mediated ads. The first accepted initialization configuration wins; repeating `initialize()` cannot toggle mediation later in the session.
103
+
104
+ `applicationId` and `debugGeography` are not accepted here.
105
+
106
+ ### `requestConsent(config)`
107
+
108
+ Updates UMP consent information and presents a required form.
109
+
110
+ ```js
111
+ Admob.requestConsent({
112
+ geography: Admob.DEBUG_GEOGRAPHY_EEA,
113
+ testDeviceIds: ['HASHED_UMP_TEST_DEVICE_ID'],
114
+ tagForUnderAgeOfConsent: false
115
+ })
116
+ ```
117
+
118
+ Accepted properties:
119
+
120
+ | Property | Type | Description |
121
+ | ------------------------- | -------- | ----------------------------------------------------------- |
122
+ | `geography` | Number | One `DEBUG_GEOGRAPHY_*` constant. Debug only. |
123
+ | `testDeviceIds` | String[] | UMP hashed device IDs. Applied when `geography` is present. |
124
+ | `tagForUnderAgeOfConsent` | Boolean | UMP under-age flag. |
125
+
126
+ It returns `void` and emits the terminal `consent_complete` event. Concurrent calls share one operation. A successful result is cached for the module session; later calls replay `consent_complete`. A failed update or form permits a new request without resetting persisted consent. Omitted debug settings use UMP defaults; the under-age flag defaults to `false`.
127
+
128
+ ### `canRequestAds()`
129
+
130
+ Returns a Boolean from native UMP consent information. UMP persists consent, so this may return `true` before the current launch requests an update. It reports whether requests are allowed now; it does not indicate whether the session has completed its update.
131
+
132
+ ### `isPrivacyOptionsRequired()`
133
+
134
+ Returns whether UMP requires a publisher-rendered privacy-options entry point. Call it after the consent update completes.
135
+
136
+ ### `presentPrivacyOptions(config)`
137
+
138
+ Presents the UMP privacy-options form and emits `privacy_options_dismissed`.
139
+
140
+ ```js
141
+ Admob.presentPrivacyOptions({})
142
+ ```
143
+
144
+ The current native implementations do not consume configuration properties. Pass an empty object for a consistent call site.
145
+
146
+ ### `resetConsent()`
147
+
148
+ Returns `void` and resets UMP test state and the module's cached consent operation. If an update or form is in flight, reset waits for its callback before resetting the SDK. A request made during that wait runs afterwards with the latest supplied configuration. Without a replacement request, the interrupted operation ends with `success: false`, code `-1` and an explanatory error. Resetting does not cancel the SDK's network request.
149
+
150
+ Use only during controlled consent testing. For a production privacy entry point, call `presentPrivacyOptions()`.
151
+
152
+ ### `getTrackingAuthorizationStatus()`
153
+
154
+ Returns `{ status: Number, authorized: Boolean, applicable: Boolean }` synchronously. On iOS it reads the current system ATT status on every call: `0` not determined, `1` restricted, `2` denied, `3` authorized. Only status `3` sets `authorized: true`; `applicable` is always `true` on supported iOS versions.
155
+
156
+ This query never presents a prompt, emits an event, or initializes an SDK. Re-query after returning from Settings to read a changed permission.
157
+
158
+ On Android it returns `{ status: 3, authorized: true, applicable: false }`. This portable ATT convention does not grant general tracking permission or replace platform privacy requirements or UMP eligibility.
159
+
160
+ ```js
161
+ const tracking = Admob.getTrackingAuthorizationStatus()
162
+ Ti.API.info(`ATT applies: ${tracking.applicable}; status: ${tracking.status}`)
163
+ ```
164
+
165
+ ### `requestTrackingAuthorization()`
166
+
167
+ Completes the portable tracking-authorization step and emits `tracking_authorization_completed`. On iOS it requests or retrieves App Tracking Transparency authorization. On Android it completes immediately with `applicable: false`, so consumers do not need a platform condition.
168
+
169
+ ### `openAdInspector()`
170
+
171
+ Presents Google Mobile Ads Ad Inspector and emits `ad_inspector_closed` when the inspector closes or fails to open.
172
+
173
+ ```js
174
+ Admob.addEventListener('ad_inspector_closed', event => {
175
+ if (!event.success) {
176
+ Ti.API.warn(`Ad Inspector failed: ${event.error} (${event.code})`)
177
+ }
178
+ })
179
+
180
+ Admob.openAdInspector()
181
+ ```
182
+
183
+ Call this only from a visible development screen after Google Mobile Ads has initialized. Google requires the device to be registered as a test device. The method does not enable test mode, change consent, or substitute production ad units.
184
+
185
+ ### `createBanner(config)`
186
+
187
+ Returns a standard banner view proxy.
188
+
189
+ ```js
190
+ const banner = Admob.createBanner({
191
+ adUnitId: Admob.TEST_BANNER,
192
+ adSize: Admob.BANNER,
193
+ width: Ti.UI.FILL
194
+ })
195
+ ```
196
+
197
+ Use `customAdSize: { width, height }` in dp for a non-standard slot on both platforms. It takes precedence over `adSize` and can request a fixed full-width strip. Adaptive banners calculate their own height.
198
+
199
+ See [Standard banner properties](banners.md#creation-properties-1).
200
+
201
+ ### `getAnchoredAdaptiveBannerSize(widthInDp)`
202
+
203
+ Returns `{ width, height, heightUnit: 'dp' }` using Google's large anchored adaptive sizing API, without requesting an ad. Pass the positive available width of the laid-out placement in dp (points on iOS). Android requires a current Activity. Use the returned height to size the host before loading; it does not include the collapsible overlay. Inline banners are not covered by this method.
204
+
205
+ ### `createAdaptiveBanner(config)`
206
+
207
+ Returns an adaptive banner view proxy.
208
+
209
+ ```js
210
+ const banner = Admob.createAdaptiveBanner({
211
+ adUnitId: Admob.TEST_ADAPTIVE_BANNER,
212
+ adaptiveType: Admob.ADAPTIVE_ANCHORED,
213
+ width: Ti.UI.FILL
214
+ })
215
+ ```
216
+
217
+ Anchored and inline are both portable, and `keywords`, `contentUrl`, `requestAgent`, `extras` and the raw `collapsible: "top" | "bottom"` option reach the request on both platforms. `maxHeight` applies to inline only. See [Adaptive banner properties](banners.md#creation-properties).
218
+
219
+ ### `createInterstitial(config)`
220
+
221
+ Returns an interstitial proxy with `load()`, `show()`, `isLoaded()`, and terminal `destroy()`.
222
+
223
+ ### `createRewarded(config)`
224
+
225
+ Returns a rewarded proxy with `load()`, `show()`, `isLoaded()`, and terminal `destroy()`. Grant rewards only from the `rewarded` event.
226
+
227
+ ### `createRewardedInterstitial(config)`
228
+
229
+ Returns a rewarded interstitial proxy with the same methods and configuration as Rewarded, using `adType: 'rewarded_interstitial'`. Explain the reward and offer a skip option before showing it. See [Rewarded interstitial ads](rewarded-interstitial.md).
230
+
231
+ ### `createAppOpen(config)`
232
+
233
+ Returns an app open proxy with `load()`, `show()`, `isLoaded()`, and terminal `destroy()`. An app open ad expires four hours after loading completes: past that point `isLoaded()` reports `false` and `show()` emits `failed_to_show` with code `1`. See [The four hour window](fullscreen.md#the-four-hour-window).
234
+
235
+ See [Fullscreen ads](fullscreen.md) for the four factories.
236
+
237
+ ### `setTestDevice(deviceId)`
238
+
239
+ Replaces the global Google Mobile Ads test-device list with one identifier.
240
+
241
+ ```js
242
+ Admob.setTestDevice('GMA_TEST_DEVICE_ID')
243
+ ```
244
+
245
+ Prefer `initialize({ testDeviceIds: [...] })` for new integrations because it supports a list and keeps initialization configuration in one place.
246
+
247
+ ### `isTestDevice()`
248
+
249
+ Compatibility diagnostic returning a Boolean. Android asks `AdRequest.isTestDevice(context)` whether this device is a test device. iOS reports whether any test identifiers are configured; it does not establish that this device matches them. Do not use this method as a portable proof that a request is a test request. Use Google test ad-unit IDs or explicitly register the device.
250
+
251
+ ### `setAppVolume(volume)`
252
+
253
+ Accepts a percentage string on both platforms, with an optional trailing `%`. For example, `"50%"` and `"50"` set native application volume to `0.5`. The valid range is `0` through `100`, inclusive. Empty, nonnumeric, nonfinite and out-of-range values are ignored with a warning; they do not change volume. Returns `void`. Google Mobile Ads applies this application-level setting to ad audio. A value set before initialization is retained and applied when the SDK starts.
254
+
255
+ ## Deprecated module methods
256
+
257
+ ### `canShowAds()`
258
+
259
+ Alias of `canRequestAds()`. Replace it in new code.
260
+
261
+ ### `canShowPersonalizedAds()`
262
+
263
+ Always returns `false`. UMP does not expose a publisher-facing personalization Boolean. Do not use it as a gate or convert it into an `npa` extra.
264
+
265
+ ### `isGDPR()`
266
+
267
+ Reads legacy IAB diagnostic storage. It is not authoritative, can be stale, and must not control ad requests or UI.
268
+
269
+ ## Banner proxy
270
+
271
+ The standard and adaptive proxies expose the same methods:
272
+
273
+ | Method | Return | Behavior |
274
+ | --------------------------------- | ------- | --------------------------------------------------------------------------------------------------- |
275
+ | `load()` | `void` | Starts one request or defers one while paused. |
276
+ | `pause()` | `void` | Idempotently records the application's pause without changing visibility, opacity, host, or layout. |
277
+ | `resume()` | `void` | Clears the application's pause and runs one deferred load only once every pause cause is clear. |
278
+ | `isLoaded()` | Boolean | Reports the current native load state. |
279
+ | `destroy()` | `void` | Terminal, idempotent native cleanup. |
280
+ | `destroyAdViewAndCancelRequest()` | `void` | Compatibility alias of `destroy()`. |
281
+ | `destoyAdViewAndCancelRequest()` | `void` | Deprecated misspelled alias. |
282
+
283
+ The host lifecycle also pauses banners: the Android activity pauses, or the iOS application enters the background. That pause is independent of these calls. Neither cause resumes the other's pause. See [Who pauses a banner](banners.md#who-pauses-a-banner).
284
+
285
+ An Android activity recreation caused by a configuration change is non-terminal. The module preserves the proxy, releases the stale native view without emitting `destroyed`, and reloads after Titanium creates the replacement view.
286
+
287
+ On Android pause/resume delegates only to the native `AdView` processing methods. On iOS it disables and restores `autoloadEnabled`. Neither platform changes the banner's visual properties. Automatic refresh remains owned by Google Mobile Ads and the refresh policy configured for the ad unit.
288
+
289
+ ### Banner creation properties
290
+
291
+ Both factories return a `TiViewProxy`, so the creation dictionary also accepts the usual Titanium layout properties. The AdMob-specific ones are:
292
+
293
+ | Property | Type | `createBanner()` | `createAdaptiveBanner()` | Notes |
294
+ | -------------- | -------- | ---------------- | ------------------------ | --------------------------------------------------------------- |
295
+ | `adUnitId` | String | Yes | Yes | Required. |
296
+ | `adSize` | String | Yes | — | One banner-size constant. Defaults to `BANNER`. |
297
+ | `customAdSize` | Object | Yes | — | `{ width, height }` in dp. Wins over `adSize`. |
298
+ | `adaptiveType` | String | — | Yes | `ADAPTIVE_ANCHORED` or `ADAPTIVE_INLINE`. Defaults to anchored. |
299
+ | `maxHeight` | Number | — | Yes | Inline only, in dp. Defaults to `50` on both platforms. |
300
+ | `collapsible` | String | — | Yes | Google's raw placement string, `"top"` or `"bottom"`. |
301
+ | `keywords` | String[] | Yes | Yes | Request keywords. |
302
+ | `contentUrl` | String | Yes | Yes | URL describing the surrounding content. |
303
+ | `requestAgent` | String | Yes | Yes | Identifies what issued the request. |
304
+ | `extras` | Object | Yes | Yes | Google ad-network extras. |
305
+
306
+ Changes to `adUnitId`, `adSize` or `customAdSize` apply on the next `load()`. The current creative stays in place until then. The module recreates the native view when required without destroying the proxy. Standard size defaults to `BANNER`; adaptive type defaults to anchored and inline `maxHeight` defaults to `50` dp. Optional targeting is omitted when unset. See [Banner ads](banners.md#creation-properties).
307
+
308
+ Portable dimensions are positive integer dp values within the signed 32-bit range and the format's SDK limits. Zero, NaN and infinity are invalid. Fractional/extreme dimensions are outside the portable contract: Android converts to integers while iOS uses CGFloat. A positive size can still be rejected by Google if it does not fit the placement.
309
+
310
+ Banner events:
311
+
312
+ | Constant | Event string | Notes |
313
+ | ------------------- | ---------------- | -------------------------------------- |
314
+ | `AD_LOADED` | `loaded` | Adaptive payload includes real height. |
315
+ | `AD_FAILED_TO_LOAD` | `failed_to_load` | Adds `error` and `code`. |
316
+ | `AD_CLICKED` | `clicked` | Native click callback. |
317
+ | `AD_IMPRESSION` | `impression` | Native impression callback. |
318
+ | `AD_OPENED` | `opened` | Ad overlay opened. |
319
+ | `AD_CLOSED` | `closed` | Ad overlay closed. |
320
+ | `AD_DESTROYED` | `destroyed` | Emitted once per proxy. |
321
+
322
+ Both banner types include Boolean `isCollapsible` in `loaded`, reporting the SDK's classification of the received ad. It does not report whether the ad is currently expanded or visibly rendered.
323
+
324
+ Common payload:
325
+
326
+ ```js
327
+ {
328
+ adUnitId: String,
329
+ adType: 'banner',
330
+ isAdaptive: Boolean
331
+ }
332
+ ```
333
+
334
+ Adaptive payloads add `adaptiveType`. Adaptive `loaded` adds:
335
+
336
+ ```js
337
+ {
338
+ width: Number,
339
+ height: Number,
340
+ widthUnit: 'dp',
341
+ heightUnit: 'dp',
342
+ widthPx: Number,
343
+ heightPx: Number,
344
+ density: Number
345
+ }
346
+ ```
347
+
348
+ All seven keys are present on both platforms. `density` converts points to pixels: Android uses `DisplayMetrics.density`, which can return fractional values such as `2.625`; iOS uses `UIScreen.scale`, which returns `1`, `2` or `3`. Account for these possible values instead of assuming one fixed density.
349
+
350
+ ## Fullscreen proxy
351
+
352
+ Interstitial, rewarded, rewarded interstitial and app open proxies expose:
353
+
354
+ | Method | Return | Description |
355
+ | ------------ | ------- | ---------------------------------------------------------------------------------------- |
356
+ | `load()` | `void` | Loads one native fullscreen ad. |
357
+ | `show()` | `void` | Presents it or emits `failed_to_show`. |
358
+ | `isLoaded()` | Boolean | Reports whether a native ad is ready. An app open ad older than four hours is not ready. |
359
+ | `destroy()` | `void` | Terminal, idempotent cleanup; emits `destroyed` once. |
360
+
361
+ Loads are serialized: calls while loading, loaded, or showing are ignored. Common fullscreen payloads always include `adUnitId` and `adType`. Failures include `error`, `message`, and `code`. Reward payloads add `rewardType` and `rewardAmount`.
362
+
363
+ ### Fullscreen creation properties
364
+
365
+ All four factories accept:
366
+
367
+ | Property | Type | Default | Notes |
368
+ | -------------- | -------- | ------- | ------------------------------------------------------ |
369
+ | `adUnitId` | String | `""` | Required before `load()`. |
370
+ | `autoReload` | Boolean | `false` | Reloads after `closed`, and after nothing else. |
371
+ | `keywords` | String[] | None | Request keywords. |
372
+ | `requestAgent` | String | None | Identifies what issued the request, on both platforms. |
373
+ | `extras` | Object | None | Google ad-network extras. |
374
+
375
+ `autoReload` leaves retries after `failed_to_load` and `failed_to_show` to the application. Use backoff for those failures.
376
+
377
+ See [Fullscreen events](fullscreen.md#events).
378
+
379
+ ## Fullscreen configuration changes
380
+
381
+ The five configuration properties `adUnitId` (String), `autoReload` (Boolean), `keywords` (String[]), `requestAgent` (String) and `extras` (Object) are readable and writable on both platforms. Changes to the four request options affect the next load and do not replace an already loaded ad. `autoReload` defaults to `false` and is read live when the shown ad closes; changing it while an ad is loaded or presented changes whether that close starts a reload. It never automatically presents the replacement or retries a failure. Targeting is omitted when unset. Extras retain String, Boolean and numeric primitive values. Internal load/presentation state and native SDK delegate methods are not application APIs.
382
+
383
+ ## Module events
384
+
385
+ ### `module_initialized`
386
+
387
+ ```js
388
+ {
389
+ success: true,
390
+ status: String
391
+ }
392
+ ```
393
+
394
+ Failure adds `error` and `code`.
395
+
396
+ ### `consent_complete`
397
+
398
+ ```js
399
+ {
400
+ success: Boolean,
401
+ canRequestAds: Boolean,
402
+ privacyOptionsRequired: Boolean,
403
+ error: String, // failure only
404
+ code: Number // failure only
405
+ }
406
+ ```
407
+
408
+ The payload also retains deprecated compatibility keys for applications coming from an older AdMob module. Do not consume them in new code.
409
+
410
+ ### `consent_ready`
411
+
412
+ Deprecated success-only compatibility event. Use `consent_complete`.
413
+
414
+ ### `consent_error`
415
+
416
+ Deprecated failure-only compatibility event. Use `consent_complete`.
417
+
418
+ ### `privacy_options_dismissed`
419
+
420
+ ```js
421
+ {
422
+ success: Boolean,
423
+ canRequestAds: Boolean,
424
+ privacyOptionsRequired: Boolean,
425
+ error: String, // failure only
426
+ code: Number // failure only
427
+ }
428
+ ```
429
+
430
+ ### `tracking_authorization_completed`
431
+
432
+ ```js
433
+ {
434
+ status: Number,
435
+ authorized: Boolean,
436
+ applicable: Boolean
437
+ }
438
+ ```
439
+
440
+ On iOS, status values are `0` not determined, `1` restricted, `2` denied, and `3` authorized. Android reports `3`, `authorized: true`, and `applicable: false` because ATT is not an Android API.
441
+
442
+ ### `ad_inspector_closed`
443
+
444
+ ```js
445
+ {
446
+ success: Boolean,
447
+ error: String, // failure only
448
+ code: Number // failure only
449
+ }
450
+ ```
451
+
452
+ `success: true` means Ad Inspector was displayed and then closed. A failure usually indicates that the SDK is not initialized, the device is not registered for testing, or there is no visible activity/controller.
453
+
454
+ ## Constants
455
+
456
+ ### Ad types
457
+
458
+ | Constant | Value | Factory status |
459
+ | ------------------------------- | ------------------------- | -------------- |
460
+ | `AD_TYPE_BANNER` | `"banner"` | Implemented |
461
+ | `AD_TYPE_INTERSTITIAL` | `"interstitial"` | Implemented |
462
+ | `AD_TYPE_REWARDED` | `"rewarded"` | Implemented |
463
+ | `AD_TYPE_REWARDED_INTERSTITIAL` | `"rewarded_interstitial"` | Implemented |
464
+ | `AD_TYPE_APP_OPEN` | `"app_open"` | Implemented |
465
+ | `AD_TYPE_NATIVE` | `"native"` | No factory |
466
+
467
+ An exported type constant does not imply that its format has a working proxy.
468
+
469
+ ### Banner sizes and modes
470
+
471
+ | Constant | Value | Portability |
472
+ | ------------------- | --------------------- | ------------ |
473
+ | `BANNER` | `"banner"` | iOS, Android |
474
+ | `LARGE_BANNER` | `"large_banner"` | iOS, Android |
475
+ | `MEDIUM_RECTANGLE` | `"medium_rectangle"` | iOS, Android |
476
+ | `FULLBANNER` | `"fullbanner"` | iOS, Android |
477
+ | `LEADERBOARD` | `"leaderboard"` | iOS, Android |
478
+ | `ADAPTIVE_ANCHORED` | `"adaptive_anchored"` | iOS, Android |
479
+ | `ADAPTIVE_INLINE` | `"adaptive_inline"` | iOS, Android |
480
+
481
+ The module exports no `COLLAPSIBLE_TOP` or `COLLAPSIBLE_BOTTOM` constant. Pass Google's accepted strings, `"top"` or `"bottom"`, directly to `collapsible` on either platform.
482
+
483
+ ### Ad events
484
+
485
+ | Constant | Value |
486
+ | ------------------------------ | ----------------------------- |
487
+ | `AD_LOADED` | `"loaded"` |
488
+ | `AD_FAILED_TO_LOAD` | `"failed_to_load"` |
489
+ | `AD_OPENED` | `"opened"` |
490
+ | `AD_CLOSED` | `"closed"` |
491
+ | `AD_CLICKED` | `"clicked"` |
492
+ | `AD_IMPRESSION` | `"impression"` |
493
+ | `AD_REWARDED` | `"rewarded"` |
494
+ | `AD_FAILED_TO_SHOW` | `"failed_to_show"` |
495
+ | `AD_SHOWED_FULLSCREEN_CONTENT` | `"showed_fullscreen_content"` |
496
+ | `AD_DESTROYED` | `"destroyed"` |
497
+
498
+ All four fullscreen proxy types (interstitial, rewarded, rewarded interstitial and app open) emit `AD_SHOWED_FULLSCREEN_CONTENT` and `AD_OPENED` on iOS and Android.
499
+
500
+ ### Consent status
501
+
502
+ - `CONSENT_STATUS_UNKNOWN`
503
+ - `CONSENT_STATUS_REQUIRED`
504
+ - `CONSENT_STATUS_NOT_REQUIRED`
505
+ - `CONSENT_STATUS_OBTAINED`
506
+
507
+ These constants mirror the native UMP enum. The module does not currently export a method that returns the raw consent-status enum; use `canRequestAds()` and `isPrivacyOptionsRequired()` for application behavior.
508
+
509
+ ### Debug geography
510
+
511
+ - `DEBUG_GEOGRAPHY_DISABLED`
512
+ - `DEBUG_GEOGRAPHY_EEA`
513
+ - `DEBUG_GEOGRAPHY_REGULATED_US_STATE`
514
+ - `DEBUG_GEOGRAPHY_OTHER`
515
+
516
+ Use the constants only in `requestConsent()` on registered UMP test devices. Do not persist or compare their numeric native values.
517
+
518
+ ### Maximum ad content rating
519
+
520
+ | Constant | Value |
521
+ | ----------------------------------------- | ------ |
522
+ | `MAX_AD_CONTENT_RATING_GENERAL` | `"G"` |
523
+ | `MAX_AD_CONTENT_RATING_PARENTAL_GUIDANCE` | `"PG"` |
524
+ | `MAX_AD_CONTENT_RATING_TEEN` | `"T"` |
525
+ | `MAX_AD_CONTENT_RATING_MATURE_AUDIENCE` | `"MA"` |
526
+
527
+ ### Age-restricted treatment
528
+
529
+ | Constant | Value |
530
+ | -------------------------------------- | --------------- |
531
+ | `AGE_RESTRICTED_TREATMENT_CHILD` | `"child"` |
532
+ | `AGE_RESTRICTED_TREATMENT_TEEN` | `"teen"` |
533
+ | `AGE_RESTRICTED_TREATMENT_UNSPECIFIED` | `"unspecified"` |
534
+
535
+ Pass these to `initialize({ ageRestrictedTreatment })`.
536
+
537
+ ### Common Google Mobile Ads error codes
538
+
539
+ | Constant | Value |
540
+ | ------------------------------ | ----: |
541
+ | `ERROR_CODE_SERVER_ERROR` | `0` |
542
+ | `ERROR_CODE_INVALID_REQUEST` | `1` |
543
+ | `ERROR_CODE_NETWORK_ERROR` | `2` |
544
+ | `ERROR_CODE_NO_FILL` | `3` |
545
+ | `ERROR_CODE_APP_ID_MISSING` | `8` |
546
+ | `ERROR_CODE_MEDIATION_NO_FILL` | `9` |
547
+ | `ERROR_CODE_INVALID_AD_SIZE` | `10` |
548
+
549
+ For `failed_to_load`, iOS GMA errors are normalized to these shared values. Native invalid request/argument or reused ad maps to `1`; no fill to `3`; network/timeout to `2`; mediation configuration/adapter failure to `0`; invalid mediation size to `10`; missing application ID to `8`; other internal/server failures to `0`. Android retains its GMA load codes, including additional SDK codes outside this list.
550
+
551
+ `failed_to_show`, UMP and Ad Inspector errors retain their native code domains. Local precondition errors can use `-1` (missing activity/controller) or `1` (invalid state/input). Always identify the event before interpreting its code. A public “No ad to show” message alone cannot distinguish lack of inventory from a nested SDK timeout.
552
+
553
+ ### Official Google demo ad units
554
+
555
+ The constant names are portable; their string values are platform-specific:
556
+
557
+ | Constant | iOS | Android | Module format | Factory |
558
+ | ---------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------- | ------------------------ |
559
+ | `TEST_BANNER` | `ca-app-pub-3940256099942544/2934735716` | `ca-app-pub-3940256099942544/6300978111` | Standard banner | `createBanner()` |
560
+ | `TEST_ADAPTIVE_BANNER` | `ca-app-pub-3940256099942544/2435281174` | `ca-app-pub-3940256099942544/9214589741` | Adaptive banner | `createAdaptiveBanner()` |
561
+ | `TEST_INTERSTITIAL` | `ca-app-pub-3940256099942544/4411468910` | `ca-app-pub-3940256099942544/1033173712` | Interstitial | `createInterstitial()` |
562
+ | `TEST_INTERSTITIAL_VIDEO` | `ca-app-pub-3940256099942544/5135589807` | `ca-app-pub-3940256099942544/8691691433` | Interstitial, video creative | `createInterstitial()` |
563
+ | `TEST_REWARDED` | `ca-app-pub-3940256099942544/1712485313` | `ca-app-pub-3940256099942544/5224354917` | Rewarded | `createRewarded()` |
564
+ | `TEST_REWARDED_INTERSTITIAL` | `ca-app-pub-3940256099942544/6978759866` | `ca-app-pub-3940256099942544/5354046379` | Rewarded interstitial | `createRewardedInterstitial()` |
565
+ | `TEST_NATIVE` | `ca-app-pub-3940256099942544/3986624511` | `ca-app-pub-3940256099942544/2247696110` | Native | None. Reserved |
566
+ | `TEST_APP_OPEN` | `ca-app-pub-3940256099942544/5575463023` | `ca-app-pub-3940256099942544/9257395921` | App open | `createAppOpen()` |
567
+
568
+ Use the constant in shared code so it selects the platform value.
569
+
570
+ `TEST_NATIVE` remains reserved; no current factory accepts it. See [Reserved and unavailable APIs](#reserved-and-unavailable-apis).
571
+
572
+ ## Mediation diagnostics
573
+
574
+ `getMediationStatus()` takes no arguments and returns the same structure and JavaScript types on iOS and Android:
575
+
576
+ ```js
577
+ {
578
+ initializationState: 'completed',
579
+ adapters: [
580
+ { adapterClass: 'native.AdapterClass', state: 'ready', description: 'SDK status', latencyMs: 125 }
581
+ ]
582
+ }
583
+ ```
584
+
585
+ `initializationState` is a String: `not_started`, `initializing`, `completed` or `failed`. Before this module's first `initialize()` call the result is `not_started` with an empty Array. A failed initialization attempt reports `failed` and may be retried. `completed` means the core initialization callback finished, even if some adapters remain `not_ready`.
586
+
587
+ `adapters` contains every entry Google reports, including Google itself, sorted by `adapterClass`. Each entry contains String `adapterClass`, String `state` (`ready` or `not_ready`), String `description` from Google, and Number `latencyMs`. iOS seconds are converted to milliseconds. Native class names can differ between platforms; do not compare them as portable provider identifiers.
588
+
589
+ The method reads Google's current public initialization status without starting SDKs or ad requests. During initialization the map can be empty or partial. An absent entry does not prove that a complement is missing. This is not an installed-module inventory, account check, credential check or guarantee of provider delivery. `ready` does not guarantee an ad.
590
+
591
+ Query after `module_initialized`:
592
+
593
+ ```js
594
+ Admob.addEventListener('module_initialized', event => {
595
+ Ti.API.info(JSON.stringify(Admob.getMediationStatus()))
596
+ })
597
+ ```
598
+
599
+ Use UMP, `canRequestAds()` and each selected provider's current privacy requirements. `disableMediation` remains a global startup option. See [AdMob mediation](mediation.md) and the [pre-release migration](migration.md#generic-mediation-diagnostics).
600
+
601
+ ## Reserved and unavailable APIs
602
+
603
+ - There is no `createNative`.
604
+ - There is no server-side verification configuration (`userId` / `customData`), paid-event / impression-level revenue callback, or public response-info API. Arbitrary `extras` do not add these features. Use `rewarded` for client-side rewards and Ad Inspector for request diagnostics.
605
+
606
+
607
+ ## Consent compatibility payloads
608
+
609
+ `consent_complete`, `consent_ready` and `consent_error` include Boolean `success`, `canRequestAds` and `privacyOptionsRequired`. They also retain `canShowAds` (alias of `canRequestAds`), `canShowPersonalizedAds` (always `false`), `isGDPR` (legacy storage diagnostic) and `isPrivacyOptionsRequired` (alias of `privacyOptionsRequired`). Failures add String `error` and Number `code`. A cached successful request replays only `consent_complete`.
610
+
611
+ Closing privacy options refreshes the cached consent result from UMP. The dismissal event itself contains `success`, `canRequestAds`, `privacyOptionsRequired` and, on failure, `error` and `code`.
612
+
613
+ ### Concurrent privacy operations
614
+
615
+ Concurrent `presentPrivacyOptions({})` calls share the outstanding native form and its dismissal event. Calling it while `requestConsent()` is running emits `privacy_options_dismissed` with `success: false`, `code: -1` and an explanatory `error`. A consent request made while privacy options are open waits for dismissal. A reset during either operation waits for its native callback, then clears UMP state before a queued request starts. The SDK operation itself cannot be cancelled. Register listeners before starting either operation.