Repository navigation
Release 4.3.2 - #48
Merged
Merged
Conversation
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.
Feat/UI destroy flow view
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.
Release/4.2.0
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.
Release/4.2.0
Release/4.2.0 cherry pick
feat: add the debug log level and order LogLevel by verbosity
…e intent id in coders
… ProductReferencePricingTerms internal
Release/4.3.0
chore: update yaml from
Feat/report transaction params
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.