Skip to content

Release 4.3.2 - #48

Merged
StanislavMayorov merged 34 commits into
masterfrom
dev
Nov 2, 2026
Merged

StanislavMayorov merged 34 commits into
masterfrom
dev

Conversation

@StanislavMayorov

Copy link
Copy Markdown
Collaborator

No description provided.

Mirrors the block that landed in AdaptySDK-iOS: an explicit method for
releasing a cached native flow view, replacing the adapty_ui_dismiss_flow_view
call with destroy: true that wrappers use today for a view that is already
off screen.

src/types/api.d.ts is regenerated from the yaml; MethodNames gains the entry
bridge.test.ts checks against the schema.
Schema 4.1.2 -> 4.2.0, package.json version aligned with the iOS SDK release.

New requests: preload_flows, preload_flows_for_default_audience,
preload_onboardings, preload_onboardings_for_default_audience,
get_pending_store_message_types, show_store_messages (iOS 16+).
New defs: StoreMessagesHandling, AdaptyStoreMessageType; AdaptyFlow gains
variation_name; AdaptyConfiguration gains store_messages_handling.

Breaking: adapty_ui_dismiss_flow_view now requires destroy.

src/types/api.d.ts is regenerated from the yaml; MethodNames in
src/types/bridge.ts gains the six new methods so bridge.test.ts stays in sync.

Known gap: AdaptyStoreMessageType is emitted as bare `string` — the codegen
script does not handle `type: string` + `anyOf`. Fixed separately.
resolveTopLevelType had no `anyOf` branch, and the plain-string fallback only
guarded `enum` and `oneOf`, so a def written as `type: string` + `anyOf` fell
through to a bare `string` and its branches were dropped. resolveType does
handle `anyOf`, but never got the chance. Output therefore depended on whether
the node carried a redundant `type: string`: AdaptyUI.Permission (no `type`)
rendered its literals, AdaptyStoreMessageType (with `type`) did not.

isPrimitiveOneOf also rejected a branch that only narrows the parent
`type: string` with a regex (`- pattern: "^storekit_-?[0-9]+$"`), which would
have turned the union into `... | unknown`; such a branch now counts as string.

renderPrimitiveUnion emits `(string & {})` instead of `string` when enum
literals sit next to an open string branch — TS collapses `'a' | string` to
`string`, so the documented values were lost from the type and from
autocomplete. This matches the hand-written open enums in src/types.

Regenerated: AdaptyStoreMessageType keeps its four literals, and
AdaptyUI.Permission plus OnboardingViewEvent.OnAnalyticsEvent.event.name no
longer collapse to `string`.
Params type for the placement preload methods landed in schema 4.2.0.
Preloading has no fetch policy — it always hits the network and only warms the
cache — so the type carries just loadTimeoutMs, and GetPlacementParamsInput
would have exposed fetchPolicy/maxAgeSeconds that the requests do not accept.
preload_onboardings and preload_onboardings_for_default_audience are removed:
onboardings are deprecated since 4.0.0 in favour of the Flow Builder API, so
there is no reason to carry preload for them into the JS SDKs. The flow
variants stay.

AdaptySDK-iOS dropped the same four requests in
adaptyteam/AdaptySDK-iOS@4a3a7d4,
so cross_platform.yaml here stays byte-identical to the one on release/4.2.0 and
the next sync has nothing to undo.

src/types/api.d.ts is regenerated from the yaml; MethodNames in
src/types/bridge.ts loses the two entries so bridge.test.ts stays in sync.
The 4.2.0 yaml added fields that reached api.d.ts but not the hand-written
layer, so they were unreachable from the SDKs:

- store_messages_handling: exposed as ios.storeMessagesHandling in
  ActivateParamsInput and encoded by AdaptyConfigurationCoder on iOS only
  when set, leaving the native default ('auto') otherwise.
- variation_name: added to AdaptyFlow as variationName and mapped in
  AdaptyFlowCoder, so it survives decode and the round-trip back to native.
- AdaptyStoreMessageType: public open union for the pending/show store
  message methods.
feat: map the 4.2.0 schema additions onto the shared models
store_messages_handling is a single flat key of AdaptyConfiguration, and the
Android crossplatform bridge (4.2.0) decodes it too: AUTO requests Google Play
in-app messages on every Activity.onResume, MANUAL only on an explicit
show_store_messages. Keeping it under ios.* hid half of the feature.

ios.storeMessagesHandling moves to the top level of ActivateParamsInput and is
encoded on both platforms, still only when set. It has not shipped in a
release yet, so no alias is kept.
get_pending_store_message_types answers with a plain string array, and
parseMethodResult had no result type that passes one through: every
non-primitive type is routed to a coder. The new type is returned as is, like
String and Boolean — the values are wire strings with no camelCase mapping.
AdaptySDK-iOS 4.2.0 introduced operationInProgress (3201) and resolverFailure
(3202) with the store message API: a show already running and no
foreground-active window scene to show in. Without them in the mapping an
AdaptyError carrying these codes had no name.
feat: add the debug log level and order LogLevel by verbosity
@StanislavMayorov
StanislavMayorov merged commit e66a2d4 into master Nov 2, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
publish — 0726ac75 Deployed Oct 30, 2026 by StanislavMayorov via Publish Package #68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant