@chipmobilesdk/rn-ads 0.4.0 → 0.5.0
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.
- package/CHANGELOG.md +18 -0
- package/README.md +881 -879
- package/package.json +49 -49
- package/skills/sdk-rn-ads/SKILL.md +274 -274
- package/src/core/adsInstance.ts +1933 -1890
- package/src/core/placementMachine.ts +12 -2
- package/src/core/privacyGate.ts +10 -1
- package/src/engine/admobEngine.ts +7 -2
- package/src/engine/port.ts +21 -2
- package/src/react/AdsBanner.tsx +340 -337
- package/src/testing/index.ts +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,24 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
6
6
|
|
|
7
7
|
The event catalog, error codes, state names, and result unions are **public API**. Renaming or removing any of them is a major change.
|
|
8
8
|
|
|
9
|
+
## [0.5.0] — 2026-11-01
|
|
10
|
+
|
|
11
|
+
Minor release: four defects on the production path. One exported union gains a member (`PrivacyUpdateResult` → `failed`), so an exhaustive `switch` over it needs one more case; nothing else requires a code change.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **A throttled reload no longer strands a loaded full-screen ad.** With `minRequestIntervalMs` set on a full-screen placement, a second `load()` inside the window overwrote a `ready` (or `showing`) placement with `throttled`. `show()` then answered `not_ready` for an ad already paid for, and because `throttled` was not a state `load()` accepted, every later load failed `not_ready` until the instance was disabled. The throttle is now consulted after the `busy` and `not_ready` guards, a `ready` placement keeps its state when a reload is refused, and `throttled` accepts the next `load()` so the throttle alone decides when it proceeds. A load issued while an ad is on screen is answered `busy` without spending a throttle slot.
|
|
16
|
+
- **Withdrawing consent through `updatePrivacy()` stops pending retries.** Closing the gate this way now cancels every scheduled retry and halts in-flight loads, the same teardown a consent-flow outcome already performed. Retries also re-check the whole gate (availability, enablement, the app's gate and the consent flow) instead of enablement alone, so no retry reaches the provider without the permission the first request had.
|
|
17
|
+
- **`PrivacyOptions.personalizedAds: false` now requests non-personalized ads.** The AdMob adapter sent `requestNonPersonalizedAdsOnly: false` unconditionally and banners sent no request options at all. Every full-screen request and every banner now carries the current choice, including one changed through `updatePrivacy()`.
|
|
18
|
+
|
|
19
|
+
- **`updatePrivacy()` no longer reports `applied` when nothing was applied.** When the update opened the gate and triggered initialization, only `ready` and `blocked` were mapped; every other outcome fell through to `applied`. A failed initialization therefore looked like success, the app never retried, and no ad was ever shown with nothing to say why. The outcome is now mapped exhaustively.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **`PrivacyUpdateResult` gains `{ status: 'failed', error: AdsError }`**, returned when the initialization an update triggered fails. `disabled`, `undecided` and `unavailable` from that initialization are passed through rather than reported as `applied`.
|
|
24
|
+
- **`updatePrivacy()` on a disposed instance returns `unavailable` / `provider_missing`**, as `initialize()` and `load()` already did. It returned `disabled`.
|
|
25
|
+
- `AdsEngine.createFullScreen` takes an optional third argument, `EngineRequestOptions` (`{ personalizedAds }`). Optional, so a custom engine written against 0.4.0 still satisfies the port; one that ignores it keeps requesting personalized ads. `FakeEngineCall` for `createFullScreen` records it as `request`.
|
|
26
|
+
|
|
9
27
|
## [0.4.0] — 2026-10-12
|
|
10
28
|
|
|
11
29
|
Additive minor release closing one gap that surfaced when `0.3.x` met an app that must let users change their consent choice. It is a **capability** gap, the same category as consent orchestration in `0.2.0`: the app could not close it without importing the provider, or without misusing `consent.reset()`, a testing-only call that wipes the stored decision while the form is open.
|