From 6a6a39b64e94bce717febb8d18459ad775abcc4c Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Wed, 28 Oct 2026 19:32:06 +0100 Subject: [PATCH 01/11] =?UTF-8?q?feat:=20SDK=204.3=20=E2=80=94=20commitmen?= =?UTF-8?q?t=20subscriptions,=20kept=20flow=20views,=20preloaded=20flows,?= =?UTF-8?q?=20held=20store=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AdaptySDK-iOS 4.3.1 with its cross-platform contract, and AdaptySDK-Android 4.3.0 (crossplatform, android-sdk, android-ui). - Commitment subscriptions on iOS: AdaptySubscription.PricingTerms carries the billing plan, the price and period of one payment and the commitment they add up to. A product goes back with its plan and the purchase intent, so MakePurchase buys it on the plan it was offered on. On both platforms a profile's access levels and subscriptions gain BillingPlan and CommitmentInfo; a subscription always has a plan, UpFront when the store reports none. - AdaptyFlow.VariationName. - A dismissed flow view can be kept (DismissFlowView with destroy: false), shown again, and released later with DestroyFlowView. - PreloadFlows and PreloadFlowsForDefaultAudience fill the flow cache for several placements. - Store messages can be held (AdaptyStoreMessagesHandling.Manual) and shown with ShowStoreMessages, on iOS filtered by type; GetPendingStoreMessageTypes lists what is held on iOS. - On iOS a price without a currency code or localized string is a decoding error, as the contract requires. - New error codes: BillingPlanUnavailable, OperationInProgress, ResolverFailure. Null placement ids and filter entries are refused before the bridge. The demo shows a kept flow view again and releases it; the harness reads list arguments element by element, keeps AdaptyStoreMessageType in its link.xml, and its StoreKit configuration has a commitment product. CHANGELOG and AGENTS.md describe the changes and the contract deviations they keep. --- .../skills/contract-conformance/extract.py | 3 + AGENTS.md | 8 +- Assets/Scripts/AdaptyListener.cs | 39 ++- Assets/SdkHarness/AGENTS.md | 8 +- Assets/SdkHarness/AdaptyDemo.storekit | 48 +++- Assets/SdkHarness/AdaptySdkHarness.cs | 12 + Assets/SdkHarness/Editor/SdkHarnessBuild.cs | 1 + Packages/com.adapty.unity-sdk/CHANGELOG.md | 33 +++ .../Runtime/Adapty.Overloads.cs | 37 +++ .../com.adapty.unity-sdk/Runtime/Adapty.cs | 194 ++++++++++++++- .../Runtime/Editor/AdaptySDKDependencies.xml | 2 +- .../Models/AdaptyConfiguration.Builder.cs | 22 +- .../Runtime/Models/AdaptyConfiguration.cs | 3 + .../Runtime/Models/AdaptyErrorCode.cs | 20 ++ .../Runtime/Models/AdaptyFlow.cs | 8 + .../AdaptyFlowPaywall.ProductReference.cs | 14 +- .../Runtime/Models/AdaptyPaywallProduct.cs | 5 + .../Runtime/Models/AdaptyPrice.cs | 18 +- .../Models/AdaptyProfile.AccessLevel.cs | 23 ++ .../Models/AdaptyProfile.Subscription.cs | 25 ++ ...daptyProfile.SubscriptionCommitmentInfo.cs | 46 ++++ ...Profile.SubscriptionCommitmentInfo.cs.meta | 11 + .../Runtime/Models/AdaptyPromotedProduct.cs | 10 +- .../Runtime/Models/AdaptyStoreMessageType.cs | 92 +++++++ .../Models/AdaptyStoreMessageType.cs.meta | 11 + .../Models/AdaptyStoreMessagesHandling.cs | 25 ++ .../AdaptyStoreMessagesHandling.cs.meta | 11 + .../Runtime/Models/AdaptySubscription.cs | 24 +- .../Models/AdaptySubscriptionBillingPlan.cs | 86 +++++++ .../AdaptySubscriptionBillingPlan.cs.meta | 11 + .../AdaptySubscriptionCommitmentInfo.cs | 35 +++ .../AdaptySubscriptionCommitmentInfo.cs.meta | 11 + .../Models/AdaptySubscriptionPricingTerms.cs | 57 +++++ .../AdaptySubscriptionPricingTerms.cs.meta | 11 + .../Runtime/Models/AdaptyUIFlowView.cs | 32 ++- .../build.gradle | 6 +- .../AdaptyPaywallProductRequest.cs | 11 +- .../AdaptyPromotedProductRequest.cs | 17 +- .../AdaptySubscriptionOfferRequest.cs | 55 ----- .../AdaptySubscriptionRequest.cs | 98 ++++++++ ...meta => AdaptySubscriptionRequest.cs.meta} | 0 README.md | 3 + cross_platform.yaml | 232 +++++++++++++++++- .../AndroidPlatformTests.cs | 29 +++ .../ContractEnforcementTests.cs | 1 + .../AdaptySDK.NextTests/RequestParityTests.cs | 1 + tests/AdaptySDK.NextTests/TransportTests.cs | 77 +++++- .../approved/flow-full.android.approved.txt | 21 +- .../approved/flow-full.editor.approved.txt | 21 +- .../approved/flow-full.ios.approved.txt | 21 +- .../flow-minimal.android.approved.txt | 1 + .../approved/flow-minimal.editor.approved.txt | 1 + .../approved/flow-minimal.ios.approved.txt | 1 + .../products-full.android.approved.txt | 40 +++ .../products-full.editor.approved.txt | 40 +++ .../approved/products-full.ios.approved.txt | 108 ++++++++ .../profile-full.android.approved.txt | 106 +++++++- .../approved/profile-full.editor.approved.txt | 106 +++++++- .../approved/profile-full.ios.approved.txt | 106 +++++++- ...promoted-product-full.android.approved.txt | 4 +- .../promoted-product-full.editor.approved.txt | 4 +- .../promoted-product-full.ios.approved.txt | 38 ++- ...moted-product-minimal.android.approved.txt | 3 +- ...omoted-product-minimal.editor.approved.txt | 3 +- .../promoted-product-minimal.ios.approved.txt | 3 +- .../public-surface.android.approved.txt | 66 ++++- .../public-surface.editor.approved.txt | 66 ++++- .../approved/public-surface.ios.approved.txt | 66 ++++- ...equest-configuration-kids.ios.approved.txt | 3 +- ...request-configuration.android.approved.txt | 3 +- .../request-configuration.editor.approved.txt | 3 +- .../request-configuration.ios.approved.txt | 3 +- .../request-flow-full.android.approved.txt | 1 + .../request-flow-full.editor.approved.txt | 1 + .../request-flow-full.ios.approved.txt | 17 +- ...est-product-plan-only.android.approved.txt | 10 + ...uest-product-plan-only.editor.approved.txt | 10 + ...request-product-plan-only.ios.approved.txt | 15 ++ ...equest-product-with-offer.ios.approved.txt | 3 + ...ed-product-with-offer.android.approved.txt | 1 + ...ted-product-with-offer.editor.approved.txt | 1 + ...omoted-product-with-offer.ios.approved.txt | 4 + .../transport-activate.editor.approved.txt | 3 +- ...port-destroy-flow-view.editor.approved.txt | 4 + ...ss-flow-view-from-view.editor.approved.txt | 5 + ...s-flow-view-keep-alive.editor.approved.txt | 5 + ...ng-store-message-types.editor.approved.txt | 3 + ...make-promoted-purchase.editor.approved.txt | 1 + ...s-for-default-audience.editor.approved.txt | 6 + ...oad-flows-with-timeout.editor.approved.txt | 7 + ...ransport-preload-flows.editor.approved.txt | 7 + ...-messages-empty-filter.editor.approved.txt | 4 + ...tore-messages-filtered.editor.approved.txt | 7 + ...rt-show-store-messages.editor.approved.txt | 3 + .../shared/Fixtures/responses/flow-full.json | 15 +- .../Fixtures/responses/products-full.json | 60 +++++ .../Fixtures/responses/profile-full.json | 34 ++- .../responses/promoted-product-full.json | 24 ++ tests/shared/Samples.cs | 1 + 99 files changed, 2425 insertions(+), 190 deletions(-) create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.SubscriptionCommitmentInfo.cs create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.SubscriptionCommitmentInfo.cs.meta create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessageType.cs create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessageType.cs.meta create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessagesHandling.cs create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessagesHandling.cs.meta create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs.meta create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionCommitmentInfo.cs create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionCommitmentInfo.cs.meta create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionPricingTerms.cs create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionPricingTerms.cs.meta delete mode 100644 Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionOfferRequest.cs create mode 100644 Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionRequest.cs rename Packages/com.adapty.unity-sdk/Runtime/Serialization/{AdaptySubscriptionOfferRequest.cs.meta => AdaptySubscriptionRequest.cs.meta} (100%) create mode 100644 tests/AdaptySDK.NextTests/AndroidPlatformTests.cs create mode 100644 tests/shared/Fixtures/approved/request-product-plan-only.android.approved.txt create mode 100644 tests/shared/Fixtures/approved/request-product-plan-only.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/request-product-plan-only.ios.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-destroy-flow-view.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-dismiss-flow-view-from-view.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-dismiss-flow-view-keep-alive.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-get-pending-store-message-types.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-preload-flows-for-default-audience.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-preload-flows-with-timeout.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-preload-flows.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-show-store-messages-empty-filter.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-show-store-messages-filtered.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-show-store-messages.editor.approved.txt diff --git a/.claude/skills/contract-conformance/extract.py b/.claude/skills/contract-conformance/extract.py index ada02117..5a5c94e7 100644 --- a/.claude/skills/contract-conformance/extract.py +++ b/.claude/skills/contract-conformance/extract.py @@ -40,6 +40,7 @@ "AdaptyProfile.AccessLevel": "AdaptyProfile+AccessLevel", "AdaptyProfile.NonSubscription": "AdaptyProfile+NonSubscription", "AdaptyProfile.Subscription": "AdaptyProfile+Subscription", + "AdaptyProfile.SubscriptionCommitmentInfo": "AdaptyProfile+SubscriptionCommitmentInfo", "AdaptyFlowPaywall.ProductReference": "AdaptyFlowPaywall+ProductReference", # $assets variants: one contract object, several C# types. Their members are unioned. "Color": "AdaptyCustomAssetColor", @@ -71,6 +72,8 @@ "AdaptySubscriptionOffer.Identifier.Type": "AdaptySubscriptionOfferType", "AdaptyWebPresentation": "AdaptyWebPresentation", "AdaptyUI.DialogActionType": "AdaptyUIDialogActionType", + # The contract's "default" is a synonym for "auto" in iOS and has no member on purpose. + "StoreMessagesHandling": "AdaptyStoreMessagesHandling", } diff --git a/AGENTS.md b/AGENTS.md index a0ede87c..8f51fdea 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -126,7 +126,7 @@ Not every `[RuntimeInitializeOnLoadMethod]` here is a reset. `Adapty.InitializeT ### Platform conditionals -There are 25 `#if` in the package, and each belongs to one of five kinds. **Compilation boundary**, 7 — a native symbol exists only there: the `_Adapty` and `_AdaptyCallbackAction` aliases, everything under `Plugins/iOS` and `Plugins/Android`, the Kids Mode post-processor. **Wire contract**, 12 — the contract itself differs: a `[DataMember]` the schema marks platform-only (`is_family_shareable` on both product responses), `offer_tags` read on Android alone, the offer id required on one more branch there. **Public API behaviour**, 3 — the iOS-only methods that on an Android device report `null`, meaning success. Their guard is `UNITY_IOS || UNITY_EDITOR` rather than `UNITY_IOS && !UNITY_EDITOR`, so the Editor reaches the no-op bridge like every other method instead of taking that branch; three `TransportTests` cases pin it. **Where a file actually is**, 2 — a `StreamingAssets` path is a different location on each platform, and the two places that resolve one do **not** agree about the Editor. `AdaptyCustomAssetPath.Resolve` has an `#else` and hands the path back unchanged. `Adapty.SetFallback` has none, so in the Editor it sends no `path` key at all — `transport-set-fallback.editor.approved.txt` is the whole request, `{"method": "set_fallback"}`. Nothing is lost by that: the Editor call reaches the no-op bridge and comes back with the not-supported error, having never needed a path. It is not an omission to repair. **The Kids Mode define**, 1 — `AdaptyConfiguration` forces `apple_idfa_collection_disabled` under `ADAPTY_KIDS_MODE && UNITY_IOS`, because the trait has compiled IDFA out of the binary and the request has to say so. +There are 29 `#if` in the package, and each belongs to one of five kinds. **Compilation boundary**, 7 — a native symbol exists only there: the `_Adapty` and `_AdaptyCallbackAction` aliases, everything under `Plugins/iOS` and `Plugins/Android`, the Kids Mode post-processor. **Wire contract**, 14 — the contract itself differs: a `[DataMember]` the schema marks platform-only (`is_family_shareable` on both product responses, `pricing_terms` read and handed back on iOS alone), a key the schema requires on one platform only (`currency_code` and `localized_string` of a price on iOS), `offer_tags` read on Android alone, the offer id required on one more branch there. **Public API behaviour**, 5 — the iOS-only methods that on an Android device report `null`, meaning success, `GetPendingStoreMessageTypes`, which reports a null list there, and the filter `ShowStoreMessages` sends on iOS alone, because the Android bridge rejects the key. Their guard is `UNITY_IOS || UNITY_EDITOR` rather than `UNITY_IOS && !UNITY_EDITOR`, so the Editor reaches the no-op bridge like every other method instead of taking that branch; `TransportTests` cases pin it. **Where a file actually is**, 2 — a `StreamingAssets` path is a different location on each platform, and the two places that resolve one do **not** agree about the Editor. `AdaptyCustomAssetPath.Resolve` has an `#else` and hands the path back unchanged. `Adapty.SetFallback` has none, so in the Editor it sends no `path` key at all — `transport-set-fallback.editor.approved.txt` is the whole request, `{"method": "set_fallback"}`. Nothing is lost by that: the Editor call reaches the no-op bridge and comes back with the not-supported error, having never needed a path. It is not an omission to repair. **The Kids Mode define**, 1 — `AdaptyConfiguration` forces `apple_idfa_collection_disabled` under `ADAPTY_KIDS_MODE && UNITY_IOS`, because the trait has compiled IDFA out of the binary and the request has to say so. The last two kinds are not platform questions the layer above could have answered, which is why they are here rather than folded away. Nothing else qualifies. A constructor must not re-decide by define what the layer above already decided: `AdaptySubscriptionOffer` used to null `OfferTags` off Android although its only caller, the converter, passes null there anyway — the approved snapshots did not move when it went, which is what redundant means. @@ -157,6 +157,8 @@ When releasing a new version, update: Steps 1, 2 and 6 are the ones a release can get wrong without anything noticing — the tag and the artifact name are both derived from `package.json`, so a forgotten `SDKVersion` ships under a correct-looking name. `PackageManifestTests` compares all three against the manifest and fails the suite instead. -The `contract-conformance` skill compares the contract with the C# that restates it; run it whenever step 3 or step 4 moves. One key is worth naming here because a conformance run will keep reporting it: `CustomerIdentityParameters.obfuscated_profile_id` is declared in the contract, Android only, and implemented by nobody — not by this SDK, not by AdaptySDK-Android 4.1.0, and iOS has no such field at all. It was left unimplemented deliberately rather than guessed at. **Re-check it on every native bump**: the moment Android starts reading it, the Unity side has to carry it too, and that is a public API change to `AdaptyCustomerIdentity`, so it wants to land in a release that expects one. +The `contract-conformance` skill compares the contract with the C# that restates it; run it whenever step 3 or step 4 moves. One key is worth naming here because a conformance run will keep reporting it: `CustomerIdentityParameters.obfuscated_profile_id` is declared in the contract, Android only, and implemented by nobody — not by this SDK, not by AdaptySDK-Android 4.3.0, and iOS has no such field at all. It was left unimplemented deliberately rather than guessed at. **Re-check it on every native bump**: the moment Android starts reading it, the Unity side has to carry it too, and that is a public API change to `AdaptyCustomerIdentity`, so it wants to land in a release that expects one. -`AdaptyErrorCode.unknownTransactionId` (1030) is the second such item, decided the same way. iOS 4.0.2 declares it, this enum does not name it, and no member is added — because nothing produces it: across the whole of `Sources/` at that tag the identifier appears only in `Sources/Errors/`, as a declaration, a description and a factory method with no call site. A code that cannot be raised needs no constant. **Re-check on every native bump** by grepping the tag for a throw site; the day one exists, the member is owed. +`AdaptyErrorCode.unknownTransactionId` (1030) is the second such item, decided the same way. iOS 4.0.2 declares it, this enum does not name it, and no member is added — because nothing produces it: across the whole of `Sources/` at that tag, and again at 4.3.1, the identifier appears only in `Sources/Errors/` and `Sources/StoreKit/Errors/StoreKitManagerError.swift`, as declarations, descriptions and factory methods with no call site. A code that cannot be raised needs no constant. **Re-check on every native bump** by grepping the tag for a throw site; the day one exists, the member is owed. + +Three more are reported by every conformance run since 4.3 and are deliberate. `AdaptyProfile.Subscription.billing_plan_id` and `AdaptyPromotedProduct.purchase_intent_id` are required on iOS by the contract and read as optional: a profile or a promoted-product event that failed to decode would be lost without a trace, while a missing plan reads as null and a missing intent fails the purchase with a native error the caller sees. `StoreMessagesHandling.default` has no member, because iOS treats it as `auto` and no wrapper sends it. diff --git a/Assets/Scripts/AdaptyListener.cs b/Assets/Scripts/AdaptyListener.cs index 776d9d50..93aa59a1 100644 --- a/Assets/Scripts/AdaptyListener.cs +++ b/Assets/Scripts/AdaptyListener.cs @@ -721,6 +721,31 @@ AdaptyError error LogIncomingCall_AdaptyUIFlowView("FlowViewDidFinishWebPaymentNavigation", view, meta); } + private readonly Dictionary keptFlowViews = + new Dictionary(); + + // Realtime: a paywall often pauses the game with timeScale = 0. + private System.Collections.IEnumerator PresentAgain(AdaptyUIFlowView view) + { + yield return new WaitForSecondsRealtime(3); + + // A second Close within the wait has already released it. + if (this.keptFlowViews.ContainsKey(view.Id)) + { + this.PresentFlowView(view, null); + } + } + + // A kept view lives until it is destroyed, so one this listener can no longer show is released. + void OnDestroy() + { + foreach (var view in this.keptFlowViews.Values) + { + view.Destroy(null); + } + this.keptFlowViews.Clear(); + } + public void FlowViewDidPerformAction(AdaptyUIFlowView view, AdaptyUIUserAction action) { LogIncomingCall_AdaptyUIFlowView( @@ -732,7 +757,18 @@ public void FlowViewDidPerformAction(AdaptyUIFlowView view, AdaptyUIUserAction a switch (action.Type) { case AdaptyUIUserActionType.Close: - view.Dismiss(null); + // Demo of a kept view: the first Close keeps it and shows it again in 3 s, the + // second one releases it. + if (this.keptFlowViews.TryAdd(view.Id, view)) + { + view.Dismiss(false, null); + this.StartCoroutine(this.PresentAgain(view)); + } + else + { + this.keptFlowViews.Remove(view.Id); + view.Dismiss(true, null); + } break; case AdaptyUIUserActionType.OpenUrl: var urlString = action.Value; @@ -801,6 +837,7 @@ AdaptyPurchaseResult purchasedResult case AdaptyPurchaseResultType.Success: try { + this.keptFlowViews.Remove(view.Id); view.Dismiss(null); var profile = purchasedResult.Profile; diff --git a/Assets/SdkHarness/AGENTS.md b/Assets/SdkHarness/AGENTS.md index 180314c6..7f85fe32 100644 --- a/Assets/SdkHarness/AGENTS.md +++ b/Assets/SdkHarness/AGENTS.md @@ -25,9 +25,15 @@ unity command harness_call --runtime-path "$APP" --method GetFlow --args '{"plac Open the **workspace**: External Dependency Manager writes a Podfile, and the bare `.xcodeproj` fails at link with `framework 'Pods_UnityFramework' not found`. Xcode runs it, not `xcodebuild`, because of purchases: `harness_build` files `Assets/SdkHarness/AdaptyDemo.storekit` in the project (as `text`, with no target membership — Xcode offers nothing else as a configuration) and selects it in the scheme's Run options, and Xcode syncs that configuration into the simulator through its Instruments service when it launches the app, so `storekitd` serves the products locally and `MakePurchase` raises Xcode's confirmation sheet instead of the Apple Account sign-in. Nothing else performs that sync: `xcodebuild` (build or test) ignores the scheme option, and an `SKTestSession` opened from the app, or from an `xcodebuild test` host, is refused by `storekitd` as not entitled. Xcode names its destination by device and runtime (`iPhone 17 Pro (26.5)`) and boots that simulator even when another one is up, so address the device by UDID (`xcrun simctl list devices`) rather than `booted`. The sheet and the "You're all set" alert after it take a tap each; the `ios-storekit-purchase` skill (`.claude/skills/ios-storekit-purchase/`) says which log line means which window is up and where its button is, so a purchase needs no screenshot. On the harness that is: `harness_activate`, `GetFlow` and `GetPaywallProducts` first, then `harness_call --method MakePurchase --args '{"product":"$GetPaywallProducts[0]"}' --timeout_ms 90000` in the background — it returns only after the alert's OK — and `GetProfile` to see the access level. The descriptor with the port and token appears next to the app's `Data/` once the server is up, which makes its existence the readiness signal. +## Commitment billing plans + +`AdaptyDemo.storekit` carries one product on a commitment plan: `yearly.commitment.6999`, in a group of its own, billed up front at 69.99 or monthly at 6.99 over a 12-month commitment (83.88). No placement offers it, so a run builds the flow by hand: take `GetFlow`'s result, set `variations[0].products[0].vendor_product_id` to `yearly.commitment.6999` and its `pricing_terms` to `[{"billing_plan_id":"monthly"}]`, and pass that JSON as `GetPaywallProducts {"flow": …}` — a flow, unlike a product, has a JSON reader. `MakePurchase` with the result raises the commitment sheet ("$6.99 per month, 12-month commitment"), and the access level in the purchase result carries `billing_plan_id: "monthly"` and `commitment` 1 of 12. Renewals are not observable this way: iOS maps a renewed transaction to an access level through the backend's product list, which has no such product. + +The format is the one Xcode 26.6 and the iOS 26.5 runtime accept, found by trial: `version` 5.0 (4.0 has no billing plans), `billingPlanType` `BILLED_UPFRONT` and `MONTHLY` (Xcode's editor spells them `upfront`/`monthly`, `storekitd` rejects those), and the up-front plan listed too — a product with only the monthly plan loads but is never returned. Xcode re-encodes the file into the simulator as `Data/Containers/Shared/AppGroup//Documents/Persistence/Octane//Configuration.storekit`, and `storekitd` reads that copy: a config it cannot read leaves every product unresolved, and the reason is in the simulator log as `Failed to read StoreKit configuration data`, not in Xcode. Local StoreKit reports such a product's `price` as the monthly amount with the commitment's `displayPrice` ($83.88), in both the product price and `commitment_info.price`; the SDK passes both through as StoreKit gives them. + ## What the commands can and cannot take -Some argument shapes have no JSON reader in the SDK and get one in the harness: a type whose instances are public static members (`AdaptyPlacementFetchPolicy`, `AdaptyExternalAttributionProvider`) is addressed by member name, and a string for a type with a one-string constructor becomes that instance (a provider by identifier); a `TimeSpan` parameter is taken as seconds (inside an object it is Newtonsoft's `"00:00:10"`); enums go through the SDK's own converter as strings; a request-only model with a nested `Builder` (`AdaptyProfileParameters`, `AdaptyConfiguration`) is built from a JSON object — constructor arguments by parameter name, every other key a `Set` call, `customAttributes` an object of string or number values — so `UpdateProfile` takes `{"param":{"firstName":"A","customAttributes":{"plan":"pro","score":3}}}`. Models with public fields and a parameterless constructor (`AdaptyUICreateFlowViewParameters`, `AdaptyUIDialogConfiguration`, `AdaptyPurchaseParameters`) read as plain JSON. Not reachable this way: `AdaptyCustomAsset` values (factory methods, no members), custom tags and timers on `CreateFlowView` (setters, not fields), `SetFallback` (needs a file in the app), and the legacy onboarding events (`IAdaptyOnboardingsEventsListener` is obsolete; the harness does not register it). `Activate` is refused by `harness_call` because activation is once per process — `harness_activate` builds the configuration, with `--configuration` for the Builder keys it has no flag for. `harness_build` targets the iOS simulator SDK, and refuses to run unless the Editor is on iOS, since the post-processor that adds the local StoreKit is compiled for the active platform; `harness_build_android` targets an Android device (see below). The player's own command set adds `console`, `runtime_status`, `simulate_pointer`; `eval` is registered there but compiled out on anything that is not the Editor or a standalone development build, which is why the harness's commands are compiled ones. An iOS device is out of reach without a package change: the runtime server writes its descriptor into the app bundle and stops itself when that write fails. +Some argument shapes have no JSON reader in the SDK and get one in the harness: a type whose instances are public static members (`AdaptyPlacementFetchPolicy`, `AdaptyExternalAttributionProvider`) is addressed by member name, and a string for a type with a one-string constructor becomes that instance (a provider by identifier); a `TimeSpan` parameter is taken as seconds (inside an object it is Newtonsoft's `"00:00:10"`); an `IReadOnlyList` parameter is read element by element by the same rules, so `ShowStoreMessages` takes `{"iosFilter":["BillingIssue","storekit_-42"]}`; enums go through the SDK's own converter as strings; a request-only model with a nested `Builder` (`AdaptyProfileParameters`, `AdaptyConfiguration`) is built from a JSON object — constructor arguments by parameter name, every other key a `Set` call, `customAttributes` an object of string or number values — so `UpdateProfile` takes `{"param":{"firstName":"A","customAttributes":{"plan":"pro","score":3}}}`. Models with public fields and a parameterless constructor (`AdaptyUICreateFlowViewParameters`, `AdaptyUIDialogConfiguration`, `AdaptyPurchaseParameters`) read as plain JSON. Not reachable this way: `AdaptyCustomAsset` values (factory methods, no members), custom tags and timers on `CreateFlowView` (setters, not fields), `SetFallback` (needs a file in the app), and the legacy onboarding events (`IAdaptyOnboardingsEventsListener` is obsolete; the harness does not register it). `Activate` is refused by `harness_call` because activation is once per process — `harness_activate` builds the configuration, with `--configuration` for the Builder keys it has no flag for. `harness_build` targets the iOS simulator SDK, and refuses to run unless the Editor is on iOS, since the post-processor that adds the local StoreKit is compiled for the active platform; `harness_build_android` targets an Android device (see below). The player's own command set adds `console`, `runtime_status`, `simulate_pointer`; `eval` is registered there but compiled out on anything that is not the Editor or a standalone development build, which is why the harness's commands are compiled ones. An iOS device is out of reach without a package change: the runtime server writes its descriptor into the app bundle and stops itself when that write fails. ## Android diff --git a/Assets/SdkHarness/AdaptyDemo.storekit b/Assets/SdkHarness/AdaptyDemo.storekit index d0ac2d37..d08e6266 100644 --- a/Assets/SdkHarness/AdaptyDemo.storekit +++ b/Assets/SdkHarness/AdaptyDemo.storekit @@ -88,10 +88,54 @@ "type": "RecurringSubscription" } ] + }, + { + "id": "ACEE3D3D-A76C-4214-9E40-E051B5C0444D", + "localizations": [], + "name": "commitment", + "subscriptions": [ + { + "adHocOffers": [], + "billingPlans": [ + { + "billingPlanType": "BILLED_UPFRONT", + "commitmentDisplayPrice": "69.99", + "displayPrice": "69.99", + "internalID": "04F33E24-EE9B-41F4-832B-28054CD35514", + "isEnabled": true + }, + { + "billingPlanType": "MONTHLY", + "commitmentDisplayPrice": "83.88", + "displayPrice": "6.99", + "internalID": "4365019D-4690-4D74-B80D-87B811B615B5", + "isEnabled": true + } + ], + "codeOffers": [], + "displayPrice": "69.99", + "familyShareable": false, + "groupNumber": 1, + "internalID": "F9CCDC09-9DAC-4E08-A819-7BC5E96FBE2A", + "introductoryOffer": null, + "localizations": [ + { + "description": "1 Year Premium, billed monthly over a 12-month commitment", + "displayName": "1 Year Commitment", + "locale": "en_US" + } + ], + "productID": "yearly.commitment.6999", + "recurringSubscriptionPeriod": "P1Y", + "referenceName": "1 Year Commitment", + "subscriptionGroupID": "ACEE3D3D-A76C-4214-9E40-E051B5C0444D", + "type": "RecurringSubscription" + } + ] } ], "version": { - "major": 4, + "major": 5, "minor": 0 } -} \ No newline at end of file +} diff --git a/Assets/SdkHarness/AdaptySdkHarness.cs b/Assets/SdkHarness/AdaptySdkHarness.cs index c83edd1d..777f6a52 100644 --- a/Assets/SdkHarness/AdaptySdkHarness.cs +++ b/Assets/SdkHarness/AdaptySdkHarness.cs @@ -433,6 +433,18 @@ private static object Read(JToken token, Type type, JsonSerializer serializer) var inner = Nullable.GetUnderlyingType(type) ?? type; + // A list goes element by element, so a store message filter can name its kinds. + if (token is JArray array && inner.IsGenericType && inner.GetGenericTypeDefinition() == typeof(IReadOnlyList<>)) + { + var element = inner.GetGenericArguments()[0]; + var items = Array.CreateInstance(element, array.Count); + for (var i = 0; i < array.Count; i++) + { + items.SetValue(Read(array[i], element, serializer), i); + } + return items; + } + if (inner == typeof(TimeSpan) && (token.Type == JTokenType.Integer || token.Type == JTokenType.Float)) { return TimeSpan.FromSeconds(token.Value()); diff --git a/Assets/SdkHarness/Editor/SdkHarnessBuild.cs b/Assets/SdkHarness/Editor/SdkHarnessBuild.cs index 82d852f7..40afe066 100644 --- a/Assets/SdkHarness/Editor/SdkHarnessBuild.cs +++ b/Assets/SdkHarness/Editor/SdkHarnessBuild.cs @@ -50,6 +50,7 @@ public static class SdkHarnessBuild + diff --git a/Packages/com.adapty.unity-sdk/CHANGELOG.md b/Packages/com.adapty.unity-sdk/CHANGELOG.md index f2f2a2a7..79e41674 100644 --- a/Packages/com.adapty.unity-sdk/CHANGELOG.md +++ b/Packages/com.adapty.unity-sdk/CHANGELOG.md @@ -12,8 +12,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `unity` in `package.json`. The package will rely on UI Toolkit runtime bindings (2023.2+) for its Editor-side mock UI; projects on 2022.3 stay on 4.1.x. +### Added + +- [iOS] Commitment subscriptions. `AdaptySubscription.PricingTerms` + (`AdaptySubscriptionPricingTerms`) carries the billing plan (`AdaptySubscriptionBillingPlan`: + `UpFront`, `Monthly`), the price and period of each payment, and the commitment they add up to. + A product goes back to the native side with its plan, so `MakePurchase` buys it on the plan it + was offered on. A plan other than up front needs iOS 26.4+ and an app built with Xcode 26.5+; + anywhere else the product comes with its up-front terms and is bought up front. On iOS the + `Price` of a commitment product and its subscription `Period` are the totals for the whole + commitment; one payment is `PricingTerms.BillingPrice`. +- `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription` gain `BillingPlan` and + `CommitmentInfo` (`AdaptyProfile.SubscriptionCommitmentInfo`: the current billing period, how + many there are, and when the commitment ends). A subscription always has a plan, + `UpFront` when the store reports none. +- `AdaptyFlow.VariationName`. +- A dismissed flow view can be kept: `AdaptyUI.DismissFlowView(view, destroy: false, ...)` or + `AdaptyUIFlowView.Dismiss(false, ...)` hides it, `Present` shows it again where it was, and + `AdaptyUI.DestroyFlowView` / `AdaptyUIFlowView.Destroy` releases it. `Dismiss` without the flag + releases the view, as before. +- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience` load the flows of several + placements into the cache, for a later `GetFlow` with a cache-first fetch policy. +- Store messages can be held and shown when the app chooses: + `AdaptyConfiguration.Builder.SetStoreMessagesHandling(AdaptyStoreMessagesHandling.Manual)`, then + `Adapty.ShowStoreMessages`, on iOS optionally filtered by `AdaptyStoreMessageType`. + `Adapty.GetPendingStoreMessageTypes` lists what is held on iOS and reports a null list on + Android. On iOS all of it needs iOS 16+. +- `AdaptyErrorCode.BillingPlanUnavailable` (1060), `OperationInProgress` (3201) and + `ResolverFailure` (3202). + ### Changed +- [iOS] AdaptySDK-iOS 4.3.1. +- [Android] AdaptySDK-Android 4.3.0. +- [iOS] A price without `currency_code` or `localized_string` is now a decoding error, as the + contract requires; iOS always sends both. - [Android] The package no longer ships a Java wrapper (`io.adapty.internal:unity-wrapper`): the bridge calls `CrossplatformHelper` from `io.adapty.internal:crossplatform` directly through JNI. Callbacks and events still arrive on the Unity thread while a flow is on screen, so its `close` diff --git a/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs b/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs index 21e6ccd3..0e4e8b9f 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs @@ -19,6 +19,30 @@ public static void GetFlowForDefaultAudience( Action completionHandler ) => GetFlowForDefaultAudience(placementId, null, completionHandler); + /// + /// Loads the flows of the given placements into the cache ahead of time, with the native + /// default timeout of 5 seconds. + /// + /// + /// See . + /// + /// The identifiers of the placements to preload. + /// The action that will be called with the result. + public static void PreloadFlows( + IReadOnlyList placementIds, + Action completionHandler + ) => PreloadFlows(placementIds, null, completionHandler); + + /// + /// Shows every store message held back by . + /// + /// + /// See . + /// + /// The action that will be called with the result. + public static void ShowStoreMessages(Action completionHandler) => + ShowStoreMessages(null, completionHandler); + /// /// Makes a purchase for the specified product. /// @@ -124,5 +148,18 @@ public static void CreateFlowView( Action completionHandler ) => CreateFlowView(flow, null, completionHandler); + /// + /// Dismisses the flow view and releases it. + /// + /// + /// A released view cannot be presented again. To keep it for another presentation, use + /// . + /// + /// An object representing the view to dismiss. + /// The action that will be called with the result. + public static void DismissFlowView( + AdaptyUIFlowView view, + Action completionHandler + ) => DismissFlowView(view, true, completionHandler); } } diff --git a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs index ef555752..16a119de 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Linq; using AdaptySDK.Serialization; using Newtonsoft.Json.Linq; @@ -132,6 +133,81 @@ Action completionHandler AdaptyRequest.Send("get_flow_for_default_audience", parameters, completionHandler); } + /// + /// Loads the flows of the given placements into the cache ahead of time, so a later + /// + /// returns without waiting for the network. + /// + /// + /// Only the placement data is loaded — not the view configuration or its media. A preloaded + /// flow is read first only by a fetch with + /// or , + /// and not at all for test users; any fetch falls back to it when the network fails. + /// The cache belongs to the current profile, so flows preloaded before Identify or + /// Logout are not found after it. If some placements + /// fail, the call reports naming them, and the + /// ones that loaded stay cached. + /// + /// The identifiers of the placements to preload. + /// How long to wait for the placements. The native default, 5 seconds, applies when null. + /// The action that will be called with the result. + public static void PreloadFlows( + IReadOnlyList placementIds, + TimeSpan? loadTimeout, + Action completionHandler + ) + { + if (placementIds is null || placementIds.Contains(null)) + { + AdaptyRequest.FailWrongParam( + "preload_flows", + "placementIds is null or contains null", + completionHandler + ); + return; + } + + var parameters = new JObject(); + parameters["placement_ids"] = new JArray(placementIds); + + if (loadTimeout.HasValue) + { + parameters["load_timeout"] = loadTimeout.Value.TotalSeconds; + } + + AdaptyRequest.SendVoid("preload_flows", parameters, completionHandler); + } + + /// + /// Loads the Default Audience flows of the given placements into the cache ahead of time, + /// for a later . + /// + /// + /// The same cache rules as . + /// + /// The identifiers of the placements to preload. + /// The action that will be called with the result. + public static void PreloadFlowsForDefaultAudience( + IReadOnlyList placementIds, + Action completionHandler + ) + { + if (placementIds is null || placementIds.Contains(null)) + { + AdaptyRequest.FailWrongParam( + "preload_flows_for_default_audience", + "placementIds is null or contains null", + completionHandler + ); + return; + } + + var parameters = new JObject(); + parameters["placement_ids"] = new JArray(placementIds); + + AdaptyRequest.SendVoid("preload_flows_for_default_audience", parameters, completionHandler); + } + /// /// Fetches the products array for a given flow. /// @@ -455,6 +531,9 @@ Action completionHandler /// /// /// This method initiates the purchase flow for a product. The result contains information about the purchase status. + /// The product is bought on its own billing plan, — there is + /// nothing to choose here. A plan other than up front needs iOS 26.4+ and an app built with Xcode 26.5+; + /// on Android and below iOS 26.4 subscriptions are bought up front. /// Read more on the Adapty Documentation /// /// An object retrieved from the paywall. @@ -482,6 +561,9 @@ Action completionHandler /// /// Promoted in-app purchases are an App Store feature; on other platforms the completion /// handler reports an error. + /// Pass the product the listener received as it is: on iOS its product, billing plan and + /// offer are looked up in the store again and bought. A win-back offer the store does not list + /// among the product's offers fails the call before the purchase starts. /// Read more on the Adapty Documentation /// /// An object received through . @@ -518,6 +600,83 @@ public static void PresentCodeRedemptionSheet(Action completionHand #endif } + /// + /// The kinds of App Store messages held for . + /// + /// + /// iOS 16+ only, and only with in the + /// configuration — otherwise, and until activation has finished, the list is empty. On + /// iOS 15 the call fails. On other platforms it completes with a null list and no error: + /// Google Play does not tell what it holds. + /// + /// The action that will be called with the result. + public static void GetPendingStoreMessageTypes( + Action, AdaptyError> completionHandler + ) + { +#if UNITY_IOS || UNITY_EDITOR + AdaptyRequest.Send>( + "get_pending_store_message_types", + null, + (value, error) => + completionHandler?.Invoke( + value?.ConvertAll(type => new AdaptyStoreMessageType(type)).AsReadOnly(), + error + ) + ); +#else + AdaptyCallbacks.InvokeSafe( + () => completionHandler?.Invoke(null, null), + $"Failed to invoke completionHandler in {nameof(GetPendingStoreMessageTypes)}(..)" + ); +#endif + } + + /// + /// Shows the store messages held back by . + /// + /// + /// On iOS 16+ the App Store messages of the given kinds are shown one after another; one + /// that fails to show stays pending for the next call. On iOS 15 the call fails, and until + /// activation has finished there is nothing to show. It fails with + /// while an earlier call is still + /// showing messages, and with when there is + /// no active window scene to show them in. On Android the Google Play in-app messages are + /// shown and the filter is not sent. + /// + /// The kinds to show on iOS. Null shows every kind, including ones this SDK does not name; an empty list shows none. + /// The action that will be called with the result. + public static void ShowStoreMessages( + IReadOnlyList iosFilter, + Action completionHandler + ) + { + if (iosFilter != null && iosFilter.Contains(null)) + { + AdaptyRequest.FailWrongParam( + "show_store_messages", + "iosFilter contains null", + completionHandler + ); + return; + } + + var parameters = new JObject(); +#if UNITY_IOS || UNITY_EDITOR + if (iosFilter != null) + { + var filter = new JArray(); + foreach (var type in iosFilter) + { + filter.Add(type.RawValue); + } + parameters["filter"] = filter; + } +#endif + + AdaptyRequest.SendVoid("show_store_messages", parameters, completionHandler); + } + /// /// Reports a transaction to Adapty in Observer mode. /// @@ -721,26 +880,53 @@ Action completionHandler } /// - /// Dismisses the flow view. + /// Dismisses the flow view, and releases it unless asked to keep it. /// /// - /// Call this method when you want to dismiss the flow view from the screen. - /// A dismissed view is released and cannot be presented again — create a new view via if you need to re-present it. + /// A released view cannot be presented again — create a new one via . + /// A kept view ( false) can be presented again with + /// and resumes where + /// it was; its events keep arriving with the same . It + /// stays in memory until + /// is called, so call it once the view is no longer needed. /// /// An object representing the view to dismiss. + /// Whether to release the view once it is dismissed. /// The action that will be called with the result. public static void DismissFlowView( AdaptyUIFlowView view, + bool destroy, Action completionHandler ) { var parameters = new JObject(); parameters["id"] = view.Id; - parameters["destroy"] = true; + parameters["destroy"] = destroy; AdaptyRequest.SendVoid("adapty_ui_dismiss_flow_view", parameters, completionHandler); } + /// + /// Releases a flow view kept by + /// with destroy false. + /// + /// + /// A view still on screen is dismissed first. Any call on a released view fails with + /// : the view is not found. + /// + /// An object representing the view to release. + /// The action that will be called with the result. + public static void DestroyFlowView( + AdaptyUIFlowView view, + Action completionHandler + ) + { + var parameters = new JObject(); + parameters["id"] = view.Id; + + AdaptyRequest.SendVoid("adapty_ui_destroy_flow_view", parameters, completionHandler); + } + /// /// Call this function if you wish to present the view. /// diff --git a/Packages/com.adapty.unity-sdk/Runtime/Editor/AdaptySDKDependencies.xml b/Packages/com.adapty.unity-sdk/Runtime/Editor/AdaptySDKDependencies.xml index 26249479..85e1f016 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Editor/AdaptySDKDependencies.xml +++ b/Packages/com.adapty.unity-sdk/Runtime/Editor/AdaptySDKDependencies.xml @@ -1,6 +1,6 @@ - + diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyConfiguration.Builder.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyConfiguration.Builder.cs index 696872ce..1dc4ff45 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyConfiguration.Builder.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyConfiguration.Builder.cs @@ -29,6 +29,7 @@ internal AdaptyConfiguration(Builder builder) IpAddressCollectionDisabled = builder.IpAddressCollectionDisabled; AdaptyAttributionEnabled = builder.AdaptyAttributionEnabled; AppleClearDataOnBackup = builder.AppleClearDataOnBackup; + StoreMessagesHandling = builder.StoreMessagesHandling; ServerCluster = builder.ServerCluster; BackendProxyHost = builder.BackendProxyHost; BackendProxyPort = builder.BackendProxyPort; @@ -51,7 +52,8 @@ internal AdaptyConfiguration(Builder builder) /// Only the API key is required, but "not set" does not mean "not sent". The nullable /// members — , , /// , - /// , , + /// , , + /// , /// , , /// and — are left out of /// the request when null, and the native SDK applies its own default. The rest are not @@ -136,6 +138,13 @@ public sealed class Builder /// public bool? AppleClearDataOnBackup; + /// + /// Whether the store's own messages are shown as they arrive or held for + /// . On iOS it needs + /// iOS 16+. Null leaves the native default, . + /// + public AdaptyStoreMessagesHandling? StoreMessagesHandling; + /// /// Which Adapty server region to talk to. Null uses the default cluster. /// @@ -196,6 +205,7 @@ public override string ToString() => + $"{nameof(IpAddressCollectionDisabled)}: {IpAddressCollectionDisabled}, " + $"{nameof(AdaptyAttributionEnabled)}: {AdaptyAttributionEnabled}, " + $"{nameof(AppleClearDataOnBackup)}: {AppleClearDataOnBackup}, " + + $"{nameof(StoreMessagesHandling)}: {StoreMessagesHandling}, " + $"{nameof(ServerCluster)}: {ServerCluster}, " + $"{nameof(BackendProxyHost)}: {BackendProxyHost}, " + $"{nameof(BackendProxyPort)}: {BackendProxyPort}, " @@ -331,6 +341,16 @@ public Builder SetAppleClearDataOnBackup(bool appleClearDataOnBackup) return this; } + /// + /// Sets . + /// + /// Who decides when App Store messages are shown. + public Builder SetStoreMessagesHandling(AdaptyStoreMessagesHandling storeMessagesHandling) + { + StoreMessagesHandling = storeMessagesHandling; + return this; + } + /// /// Sets . /// diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyConfiguration.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyConfiguration.cs index b767b7c7..42c5302d 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyConfiguration.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyConfiguration.cs @@ -28,6 +28,8 @@ public sealed partial class AdaptyConfiguration private readonly bool? AdaptyAttributionEnabled; [DataMember(Name = "clear_data_on_backup")] private readonly bool? AppleClearDataOnBackup; + [DataMember(Name = "store_messages_handling")] + private readonly AdaptyStoreMessagesHandling? StoreMessagesHandling; [DataMember(Name = "server_cluster")] private readonly AdaptyServerCluster? ServerCluster; [DataMember(Name = "backend_proxy_host")] @@ -66,6 +68,7 @@ public override string ToString() => + $"{nameof(IpAddressCollectionDisabled)}: {IpAddressCollectionDisabled}, " + $"{nameof(AdaptyAttributionEnabled)}: {AdaptyAttributionEnabled}, " + $"{nameof(AppleClearDataOnBackup)}: {AppleClearDataOnBackup}, " + + $"{nameof(StoreMessagesHandling)}: {StoreMessagesHandling}, " + $"{nameof(ServerCluster)}: {ServerCluster}, " + $"{nameof(BackendProxyHost)}: {BackendProxyHost}, " + $"{nameof(BackendProxyPort)}: {BackendProxyPort}, " diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyErrorCode.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyErrorCode.cs index 4a5747bd..93f0cb48 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyErrorCode.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyErrorCode.cs @@ -224,6 +224,14 @@ public enum AdaptyErrorCode /// PaymentPendingError = 1050, + /// + /// iOS only. The product cannot be bought on the billing plan it was offered on, because + /// StoreKit no longer offers that plan for it. Below iOS 26.4, or in an app built with + /// Xcode older than 26.5, products are offered on their up-front terms instead, so this + /// does not come up there. + /// + BillingPlanUnavailable = 1060, + /// /// The two platforms mean different things by this number. On iOS the SDK was called /// before ; on Android the Adapty backend answered 401 or 403, @@ -306,6 +314,18 @@ public enum AdaptyErrorCode /// FetchTimeoutError = 3101, + /// + /// iOS only. + /// was called while the messages of an earlier call were still being shown. + /// + OperationInProgress = 3201, + + /// + /// iOS only. + /// found no active window scene to show the messages in. + /// + ResolverFailure = 3202, + /// /// Android only. Reported through FlowViewDidReceiveError when an asset in the flow /// is not of the type the layout expects. diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyFlow.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyFlow.cs index b63b70de..afeba363 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyFlow.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyFlow.cs @@ -43,6 +43,13 @@ public sealed class AdaptyFlow [DataMember(Name = "variation_id", IsRequired = true)] public readonly string VariationId; + /// + /// The variation name configured in the Adapty Dashboard. Null when the native side does + /// not report one. + /// + [DataMember(Name = "variation_name")] + public readonly string VariationName; + /// /// Array of custom JSON formatted data configured in the Adapty Dashboard, one entry per locale. /// @@ -176,6 +183,7 @@ public override string ToString() => + $"{nameof(InstanceIdentity)}: {InstanceIdentity}, " + $"{nameof(Name)}: {Name}, " + $"{nameof(VariationId)}: {VariationId}, " + + $"{nameof(VariationName)}: {VariationName}, " + $"{nameof(_FlowVersionId)}: {_FlowVersionId}, " + $"{nameof(RemoteConfigs)}: [{string.Join(", ", RemoteConfigs)}], " + $"{nameof(Paywalls)}: {(Paywalls is null ? "null" : "[" + string.Join(", ", Paywalls) + "]")}, " diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyFlowPaywall.ProductReference.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyFlowPaywall.ProductReference.cs index f780d198..b22b7bbe 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyFlowPaywall.ProductReference.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyFlowPaywall.ProductReference.cs @@ -1,4 +1,5 @@ using System.Runtime.Serialization; +using Newtonsoft.Json.Linq; using UnityEngine.Scripting; namespace AdaptySDK @@ -21,14 +22,12 @@ private ProductReference() { } internal readonly string AccessLevelId; [DataMember(Name = "product_type", IsRequired = true)] internal readonly string ProductType; + // Handed back to the native side as received: C# never reads the offers, and a typed + // copy would drop any key a later native adds. #if UNITY_IOS - [DataMember(Name = "promotional_offer_id")] + [DataMember(Name = "pricing_terms")] #endif - internal readonly string PromotionalOfferId; -#if UNITY_IOS - [DataMember(Name = "win_back_offer_id")] -#endif - internal readonly string WinBackOfferId; + internal readonly JArray PricingTerms; #if UNITY_ANDROID [DataMember(Name = "base_plan_id")] #endif @@ -57,8 +56,7 @@ public override string ToString() => + $"{nameof(AdaptyProductId)}: {AdaptyProductId}, " + $"{nameof(AccessLevelId)}: {AccessLevelId}, " + $"{nameof(ProductType)}: {ProductType}, " - + $"{nameof(PromotionalOfferId)}: {PromotionalOfferId}, " - + $"{nameof(WinBackOfferId)}: {WinBackOfferId}, " + + $"{nameof(PricingTerms)}: {PricingTerms?.ToString(Newtonsoft.Json.Formatting.None)}, " + $"{nameof(AndroidBasePlanId)}: {AndroidBasePlanId}, " + $"{nameof(AndroidOfferId)}: {AndroidOfferId}"; } diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPaywallProduct.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPaywallProduct.cs index 20607f6c..a6f3d1e0 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPaywallProduct.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPaywallProduct.cs @@ -102,6 +102,11 @@ private AdaptyPaywallProduct() { } /// /// The object that represents the main price for the product. /// + /// + /// For a subscription on iOS this is the total over the whole commitment: twelve payments + /// for a plan paid monthly. A single payment is + /// . + /// [DataMember(Name = "price", IsRequired = true)] public readonly AdaptyPrice Price; diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPrice.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPrice.cs index 7a2aafae..cd4258f8 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPrice.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPrice.cs @@ -20,11 +20,14 @@ private AdaptyPrice() { } public readonly double Amount; /// - /// The currency code of the locale used to format the price of the product. - /// /// - /// [Nullable] + /// The currency code of the locale used to format the price of the product. Always set on + /// iOS; may be null on Android. /// +#if UNITY_IOS + [DataMember(Name = "currency_code", IsRequired = true)] +#else [DataMember(Name = "currency_code")] +#endif public readonly string CurrencyCode; /// @@ -36,11 +39,14 @@ private AdaptyPrice() { } public readonly string CurrencySymbol; /// - /// A formatted price of a discount for a user's locale. - /// - /// [Nullable] + /// A formatted price of a discount for a user's locale. Always set on iOS; may be null on + /// Android. /// +#if UNITY_IOS + [DataMember(Name = "localized_string", IsRequired = true)] +#else [DataMember(Name = "localized_string")] +#endif public readonly string LocalizedString; /// diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.AccessLevel.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.AccessLevel.cs index eec2a53e..196cbbc1 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.AccessLevel.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.AccessLevel.cs @@ -156,6 +156,27 @@ private AccessLevel() { } [DataMember(Name = "cancellation_reason")] public readonly string CancellationReason; + [DataMember(Name = "billing_plan_id")] + private readonly string _BillingPlan; + + /// + /// The billing plan the subscription was bought on. Null when the store reported no + /// plan. + /// + public AdaptySubscriptionBillingPlan BillingPlan => + _BillingPlan is null ? null : new AdaptySubscriptionBillingPlan(_BillingPlan); + + /// + /// Where the subscription stands within its commitment. Null unless it was bought on a + /// commitment plan such as . + /// + /// + /// is the end of the period paid for; the end of the + /// commitment is . + /// + [DataMember(Name = "commitment")] + public readonly SubscriptionCommitmentInfo CommitmentInfo; + /// /// Whether the purchase was refunded. /// @@ -184,6 +205,8 @@ public override string ToString() => $"{nameof(Id)}: {Id}, " + $"{nameof(BillingIssueDetectedAt)}: {BillingIssueDetectedAt}, " + $"{nameof(StartsAt)}: {StartsAt}, " + $"{nameof(CancellationReason)}: {CancellationReason}, " + + $"{nameof(BillingPlan)}: {BillingPlan}, " + + $"{nameof(CommitmentInfo)}: {CommitmentInfo}, " + $"{nameof(IsRefund)}: {IsRefund}"; } } diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.Subscription.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.Subscription.cs index fa8dbc03..f4f701aa 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.Subscription.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.Subscription.cs @@ -171,6 +171,28 @@ private Subscription() { } [DataMember(Name = "cancellation_reason")] public readonly string CancellationReason; + [DataMember(Name = "billing_plan_id")] + private readonly string _BillingPlan; + + /// + /// The billing plan the subscription was bought on. Always set — + /// when the store reports none, + /// including for a subscription bought elsewhere. + /// + public AdaptySubscriptionBillingPlan BillingPlan => + _BillingPlan is null ? null : new AdaptySubscriptionBillingPlan(_BillingPlan); + + /// + /// Where the subscription stands within its commitment. Null unless it was bought on a + /// commitment plan such as . + /// + /// + /// is the end of the period paid for; the end of the + /// commitment is . + /// + [DataMember(Name = "commitment")] + public readonly SubscriptionCommitmentInfo CommitmentInfo; + /// /// A description for logs and the debugger. The format is not part of the contract — /// read the members rather than parsing it. @@ -186,6 +208,7 @@ public override string ToString() => $"{nameof(IsActive)}: {IsActive}, " + $"{nameof(ActiveIntroductoryOfferType)}: {ActiveIntroductoryOfferType}, " + $"{nameof(ActivePromotionalOfferType)}: {ActivePromotionalOfferType}, " + $"{nameof(ActivePromotionalOfferId)}: {ActivePromotionalOfferId}, " + + $"{nameof(OfferId)}: {OfferId}, " + $"{nameof(WillRenew)}: {WillRenew}, " + $"{nameof(IsInGracePeriod)}: {IsInGracePeriod}, " + $"{nameof(UnsubscribedAt)}: {UnsubscribedAt}, " + @@ -194,6 +217,8 @@ public override string ToString() => $"{nameof(IsActive)}: {IsActive}, " + $"{nameof(VendorTransactionId)}: {VendorTransactionId}, " + $"{nameof(VendorOriginalTransactionId)}: {VendorOriginalTransactionId}, " + $"{nameof(CancellationReason)}: {CancellationReason}, " + + $"{nameof(BillingPlan)}: {BillingPlan}, " + + $"{nameof(CommitmentInfo)}: {CommitmentInfo}, " + $"{nameof(IsRefund)}: {IsRefund}"; } } diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.SubscriptionCommitmentInfo.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.SubscriptionCommitmentInfo.cs new file mode 100644 index 00000000..39f47546 --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.SubscriptionCommitmentInfo.cs @@ -0,0 +1,46 @@ +using System; +using System.Runtime.Serialization; + +namespace AdaptySDK +{ + public sealed partial class AdaptyProfile + { + /// + /// Where a subscription bought on a commitment plan stands within that commitment. + /// + [DataContract] + public sealed class SubscriptionCommitmentInfo + { + private SubscriptionCommitmentInfo() { } + + /// + /// The billing period the commitment is in now, counted from the start of the + /// commitment. + /// + [DataMember(Name = "billing_period_number", IsRequired = true)] + public readonly int BillingPeriodNumber; + + /// + /// How many billing periods the commitment has in total. + /// + [DataMember(Name = "total_billing_periods", IsRequired = true)] + public readonly int TotalBillingPeriods; + + /// + /// When the commitment ends — later than the expiry of the access it grants, which + /// ends with the period paid for. + /// + [DataMember(Name = "expires_at", IsRequired = true)] + public readonly DateTime ExpiresAt; + + /// + /// A description for logs and the debugger. The format is not part of the contract — + /// read the members rather than parsing it. + /// + public override string ToString() => + $"{nameof(BillingPeriodNumber)}: {BillingPeriodNumber}, " + + $"{nameof(TotalBillingPeriods)}: {TotalBillingPeriods}, " + + $"{nameof(ExpiresAt)}: {ExpiresAt}"; + } + } +} diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.SubscriptionCommitmentInfo.cs.meta b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.SubscriptionCommitmentInfo.cs.meta new file mode 100644 index 00000000..b0eddba3 --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyProfile.SubscriptionCommitmentInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e8ce18755b7e46b1b1161244c527f5d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPromotedProduct.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPromotedProduct.cs index eb048d34..a0190901 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPromotedProduct.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyPromotedProduct.cs @@ -71,6 +71,13 @@ private AdaptyPromotedProduct() { } internal string PayloadData => _PayloadData; + // The contract requires it on iOS; read leniently, since an event that fails to decode is + // dropped, while a purchase without it gets a native error the caller can see. + [DataMember(Name = "purchase_intent_id")] + private readonly string _PurchaseIntentId; + + internal string PurchaseIntentId => _PurchaseIntentId; + /// /// A description for logs and the debugger. The format is not part of the contract — /// read the members rather than parsing it. @@ -83,6 +90,7 @@ public override string ToString() => + $"{nameof(RegionCode)}: {RegionCode}, " + $"{nameof(Price)}: {Price}, " + $"{nameof(Subscription)}: {Subscription}, " - + $"{nameof(_PayloadData)}: {_PayloadData}"; + + $"{nameof(_PayloadData)}: {_PayloadData}, " + + $"{nameof(_PurchaseIntentId)}: {_PurchaseIntentId}"; } } diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessageType.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessageType.cs new file mode 100644 index 00000000..a8c4d67a --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessageType.cs @@ -0,0 +1,92 @@ +using System; +using UnityEngine.Scripting; + +namespace AdaptySDK +{ + /// + /// The kind of an App Store message waiting to be shown. iOS only. + /// + /// + /// The shared instances are the kinds known when this SDK version was released, not the + /// limit: a reason StoreKit adds later arrives as storekit_<n> with its own + /// . + /// + [Preserve] + public sealed class AdaptyStoreMessageType : IEquatable + { + /// + /// The identifier the native SDK reports the kind by. + /// + public readonly string RawValue; + + /// + /// Creates a kind from its identifier — for a kind added after the shared instances were + /// snapshotted. + /// + /// The identifier the native SDK reports the kind by. + /// The identifier is null. + public AdaptyStoreMessageType(string rawValue) + { + RawValue = rawValue ?? throw new ArgumentNullException(nameof(rawValue)); + } + + /// + /// A general App Store message. + /// + public static readonly AdaptyStoreMessageType Generic = new("generic"); + + /// + /// A request to consent to a subscription price increase. + /// + public static readonly AdaptyStoreMessageType PriceIncreaseConsent = new("price_increase_consent"); + + /// + /// A subscription billing issue. + /// + public static readonly AdaptyStoreMessageType BillingIssue = new("billing_issue"); + + /// + /// A win-back offer the user is eligible for. + /// + public static readonly AdaptyStoreMessageType WinBackOffer = new("win_back_offer"); + + /// + /// Whether the other kind carries the same identifier. + /// + /// The kind to compare with. + public bool Equals(AdaptyStoreMessageType other) => + other is not null && RawValue == other.RawValue; + + /// + /// Whether the other object is a kind carrying the same identifier. + /// + /// The object to compare with. + public override bool Equals(object obj) => Equals(obj as AdaptyStoreMessageType); + + /// + /// The hash code of the identifier. + /// + public override int GetHashCode() => RawValue.GetHashCode(); + + /// + /// Whether both kinds carry the same identifier, or both are null. + /// + /// The left kind. + /// The right kind. + public static bool operator ==(AdaptyStoreMessageType a, AdaptyStoreMessageType b) => + a is null ? b is null : a.Equals(b); + + /// + /// Whether the kinds carry different identifiers, or exactly one is null. + /// + /// The left kind. + /// The right kind. + public static bool operator !=(AdaptyStoreMessageType a, AdaptyStoreMessageType b) => + !(a == b); + + /// + /// The identifier itself. + /// + public override string ToString() => RawValue; + } +} diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessageType.cs.meta b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessageType.cs.meta new file mode 100644 index 00000000..1129971e --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessageType.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: aa6ebb476b2b4a22af5dc5c853d40bab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessagesHandling.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessagesHandling.cs new file mode 100644 index 00000000..d5ad59e4 --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessagesHandling.cs @@ -0,0 +1,25 @@ +using System.Runtime.Serialization; +using UnityEngine.Scripting; + +namespace AdaptySDK +{ + /// + /// Who decides when the store's own messages — a billing issue, a price increase — are + /// shown. On iOS it needs iOS 16+. + /// + [Preserve] + public enum AdaptyStoreMessagesHandling + { + /// + /// The store shows them as they arrive. The native default. + /// + [EnumMember(Value = "auto")] + Auto = 0, + + /// + /// They are held until . + /// + [EnumMember(Value = "manual")] + Manual = 1, + } +} diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessagesHandling.cs.meta b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessagesHandling.cs.meta new file mode 100644 index 00000000..cb27ed4a --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyStoreMessagesHandling.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 211ca32d2b034533812d274d655e9ccc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscription.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscription.cs index 68054073..1ddaf011 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscription.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscription.cs @@ -27,17 +27,38 @@ private AdaptySubscription() { } /// The period details for products that are subscriptions. /// /// + /// + /// On iOS this is the period of the whole commitment: a year for a plan paid monthly. The + /// time between payments is . + /// [DataMember(Name = "period", IsRequired = true)] public readonly AdaptySubscriptionPeriod Period; /// - /// Localized subscription period of the product. + /// Localized subscription period of the product — on iOS, of the whole commitment, like + /// . /// /// [Nullable] /// [DataMember(Name = "localized_period")] public readonly string LocalizedPeriod; + /// + /// iOS only. How the subscription is billed: its plan, each payment, and the commitment. + /// Null on Android. + /// + /// + /// A plan other than is offered only on + /// iOS 26.4+ in an app built with Xcode 26.5+, in a storefront that offers it; anywhere + /// else the product comes with its up-front terms and is bought up front. The purchase + /// fails with only when StoreKit no + /// longer offers the plan by the time the product is bought. + /// +#if UNITY_IOS + [DataMember(Name = "pricing_terms", IsRequired = true)] +#endif + public readonly AdaptySubscriptionPricingTerms PricingTerms; + /// /// The discounted offer attached to this subscription, or null when it is at full price. /// @@ -69,6 +90,7 @@ public override string ToString() => $"{nameof(GroupIdentifier)}: {GroupIdentifier}, " + $"{nameof(Period)}: {Period}, " + $"{nameof(LocalizedPeriod)}: {LocalizedPeriod}, " + + $"{nameof(PricingTerms)}: {PricingTerms}, " + $"{nameof(Offer)}: {Offer}, " + $"{nameof(RenewalType)}: {RenewalType}, " + $"{nameof(BasePlanId)}: {BasePlanId}"; diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs new file mode 100644 index 00000000..2a0e3d11 --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs @@ -0,0 +1,86 @@ +using System; +using UnityEngine.Scripting; + +namespace AdaptySDK +{ + /// + /// How a subscription is paid for: all at once, or in installments over a commitment. + /// + /// + /// The shared instances are the plans known when this SDK version was released, not the + /// limit: a plan StoreKit or the native SDK adds later arrives with its own + /// rather than being mapped to one of them. + /// + [Preserve] + public sealed class AdaptySubscriptionBillingPlan : IEquatable + { + /// + /// The identifier the native SDK reports the plan by. + /// + public readonly string RawValue; + + /// + /// Creates a plan from its identifier — for a plan added after the shared instances were + /// snapshotted. + /// + /// The identifier the native SDK reports the plan by. + /// The identifier is null. + public AdaptySubscriptionBillingPlan(string rawValue) + { + RawValue = rawValue ?? throw new ArgumentNullException(nameof(rawValue)); + } + + /// + /// The whole subscription period is charged at once. + /// + public static readonly AdaptySubscriptionBillingPlan UpFront = new("up_front"); + + /// + /// The commitment is charged in monthly installments. iOS 26.4+ only. + /// + public static readonly AdaptySubscriptionBillingPlan Monthly = new("monthly"); + + /// + /// Whether the other plan carries the same identifier. + /// + /// The plan to compare with. + public bool Equals(AdaptySubscriptionBillingPlan other) => + other is not null && RawValue == other.RawValue; + + /// + /// Whether the other object is a plan carrying the same identifier. + /// + /// The object to compare with. + public override bool Equals(object obj) => Equals(obj as AdaptySubscriptionBillingPlan); + + /// + /// The hash code of the identifier. + /// + public override int GetHashCode() => RawValue.GetHashCode(); + + /// + /// Whether both plans carry the same identifier, or both are null. + /// + /// The left plan. + /// The right plan. + public static bool operator ==( + AdaptySubscriptionBillingPlan a, + AdaptySubscriptionBillingPlan b + ) => a is null ? b is null : a.Equals(b); + + /// + /// Whether the plans carry different identifiers, or exactly one is null. + /// + /// The left plan. + /// The right plan. + public static bool operator !=( + AdaptySubscriptionBillingPlan a, + AdaptySubscriptionBillingPlan b + ) => !(a == b); + + /// + /// The identifier itself. + /// + public override string ToString() => RawValue; + } +} diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs.meta b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs.meta new file mode 100644 index 00000000..99b6fd82 --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c8a4d2c9a244f4ab577b29fab8cd6ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionCommitmentInfo.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionCommitmentInfo.cs new file mode 100644 index 00000000..021e84f5 --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionCommitmentInfo.cs @@ -0,0 +1,35 @@ +using System.Runtime.Serialization; +using UnityEngine.Scripting; + +namespace AdaptySDK +{ + /// + /// The total a subscription's billing plan commits the user to. iOS only. + /// + [DataContract] + [Preserve] + public sealed class AdaptySubscriptionCommitmentInfo + { + private AdaptySubscriptionCommitmentInfo() { } + + /// + /// The total price over the whole commitment. + /// + [DataMember(Name = "price", IsRequired = true)] + public readonly AdaptyPrice Price; + + /// + /// How long the commitment lasts. + /// + [DataMember(Name = "period", IsRequired = true)] + public readonly AdaptySubscriptionPeriod Period; + + /// + /// A description for logs and the debugger. The format is not part of the contract — + /// read the members rather than parsing it. + /// + public override string ToString() => + $"{nameof(Price)}: {Price}, " + + $"{nameof(Period)}: {Period}"; + } +} diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionCommitmentInfo.cs.meta b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionCommitmentInfo.cs.meta new file mode 100644 index 00000000..4dd319a0 --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionCommitmentInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e5d94b43ac014436a45a34085fdfa2bb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionPricingTerms.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionPricingTerms.cs new file mode 100644 index 00000000..29e32fbe --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionPricingTerms.cs @@ -0,0 +1,57 @@ +using System.Runtime.Serialization; +using UnityEngine.Scripting; + +namespace AdaptySDK +{ + /// + /// How a subscription product is billed: the plan, each payment, and the total the user + /// commits to. iOS only. + /// + /// + /// Every subscription product on iOS carries terms — + /// when no other plan applies, and then the payment and the commitment are the same. + /// + [DataContract] + [Preserve] + public sealed class AdaptySubscriptionPricingTerms + { + private AdaptySubscriptionPricingTerms() { } + + [DataMember(Name = "billing_plan_id", IsRequired = true)] + private readonly string _BillingPlan; + + /// + /// The plan these terms are for. It goes back with the purchase, so the product is bought + /// on this plan. + /// + public AdaptySubscriptionBillingPlan BillingPlan => new(_BillingPlan); + + /// + /// The price of each payment. + /// + [DataMember(Name = "billing_price", IsRequired = true)] + public readonly AdaptyPrice BillingPrice; + + /// + /// The time between payments. + /// + [DataMember(Name = "billing_period", IsRequired = true)] + public readonly AdaptySubscriptionPeriod BillingPeriod; + + /// + /// The total price and period the user commits to. + /// + [DataMember(Name = "commitment_info", IsRequired = true)] + public readonly AdaptySubscriptionCommitmentInfo CommitmentInfo; + + /// + /// A description for logs and the debugger. The format is not part of the contract — + /// read the members rather than parsing it. + /// + public override string ToString() => + $"{nameof(BillingPlan)}: {_BillingPlan}, " + + $"{nameof(BillingPrice)}: {BillingPrice}, " + + $"{nameof(BillingPeriod)}: {BillingPeriod}, " + + $"{nameof(CommitmentInfo)}: {CommitmentInfo}"; + } +} diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionPricingTerms.cs.meta b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionPricingTerms.cs.meta new file mode 100644 index 00000000..c889244a --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionPricingTerms.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b396f25ce1bd45108bd79a79bf6b1b8c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyUIFlowView.cs b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyUIFlowView.cs index 518cc031..e1493d92 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyUIFlowView.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Models/AdaptyUIFlowView.cs @@ -4,8 +4,9 @@ namespace AdaptySDK { /// - /// A flow view built by . Single use: once dismissed it - /// is destroyed, and showing the flow again means building another one. + /// A flow view built by . Dismissing it releases it + /// unless it is dismissed with destroy false, which keeps it for another + /// until . /// [DataContract] [Preserve] @@ -72,13 +73,34 @@ public void Present(System.Action completionHandler) => ); /// - /// Call this function if you wish to dismiss the view. + /// Dismisses the view and releases it. /// /// - /// A dismissed view is released and cannot be presented again. Create a new view via if you need to re-present it. + /// A released view cannot be presented again. Create a new view via if you need to re-present it, + /// or keep this one with . /// /// The action that will be called with the result. public void Dismiss(System.Action completionHandler) => - AdaptyUI.DismissFlowView(this, completionHandler); + AdaptyUI.DismissFlowView(this, true, completionHandler); + + /// + /// Dismisses the view, and releases it unless asked to keep it. + /// + /// + /// A kept view can be presented again and resumes where it was. It stays in memory until + /// . + /// + /// Whether to release the view once it is dismissed. + /// The action that will be called with the result. + public void Dismiss(bool destroy, System.Action completionHandler) => + AdaptyUI.DismissFlowView(this, destroy, completionHandler); + + /// + /// Releases a view kept by , dismissing + /// it first if it is on screen. + /// + /// The action that will be called with the result. + public void Destroy(System.Action completionHandler) => + AdaptyUI.DestroyFlowView(this, completionHandler); } } diff --git a/Packages/com.adapty.unity-sdk/Runtime/Plugins/Android/AdaptySDKDependencies.androidlib/build.gradle b/Packages/com.adapty.unity-sdk/Runtime/Plugins/Android/AdaptySDKDependencies.androidlib/build.gradle index 06675011..1434895d 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Plugins/Android/AdaptySDKDependencies.androidlib/build.gradle +++ b/Packages/com.adapty.unity-sdk/Runtime/Plugins/Android/AdaptySDKDependencies.androidlib/build.gradle @@ -3,9 +3,9 @@ apply plugin: 'com.android.library' def unityLibraryAndroid = project(':unityLibrary').android dependencies { - api 'io.adapty.internal:crossplatform:4.1.4' - api 'io.adapty:android-sdk:4.1.0' - api 'io.adapty:android-ui:4.1.1' + api 'io.adapty.internal:crossplatform:4.3.0' + api 'io.adapty:android-sdk:4.3.0' + api 'io.adapty:android-ui:4.3.0' } android { diff --git a/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptyPaywallProductRequest.cs b/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptyPaywallProductRequest.cs index 586b8622..ee231a3f 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptyPaywallProductRequest.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptyPaywallProductRequest.cs @@ -5,7 +5,7 @@ namespace AdaptySDK.Serialization { /// /// What the native side expects when a product is handed back to it - a strict subset of what - /// it sent, with the subscription reduced to its offer identifier. + /// it sent, with the subscription reduced to its billing plan and offer identifier. /// /// /// The model itself cannot express this: a member carries one contract name for both @@ -28,12 +28,7 @@ internal AdaptyPaywallProductRequest(AdaptyPaywallProduct product) PaywallProductIndex = product.PaywallProductIndex; WebPurchaseUrl = product.WebPurchaseUrl; PayloadData = product.PayloadData; - - var offer = product.Subscription?.Offer; - if (offer != null) - { - Subscription = new AdaptySubscriptionOfferRequest(offer); - } + Subscription = AdaptySubscriptionRequest.From(product.Subscription); } [DataMember(Name = "vendor_product_id", IsRequired = true)] @@ -78,6 +73,6 @@ internal AdaptyPaywallProductRequest(AdaptyPaywallProduct product) [DataMember(Name = "subscription")] [Preserve] - private AdaptySubscriptionOfferRequest Subscription { get; } + private AdaptySubscriptionRequest Subscription { get; } } } diff --git a/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptyPromotedProductRequest.cs b/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptyPromotedProductRequest.cs index b3b7440a..f7d33fa9 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptyPromotedProductRequest.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptyPromotedProductRequest.cs @@ -5,7 +5,7 @@ namespace AdaptySDK.Serialization { /// /// What the native side expects when a promoted product is handed back to it - a strict subset - /// of what it sent, with the subscription reduced to its offer identifier. + /// of what it sent, with the subscription reduced to its billing plan and offer identifier. /// /// /// The model itself cannot express this: a member carries one contract name for both @@ -18,16 +18,17 @@ internal sealed class AdaptyPromotedProductRequest { internal AdaptyPromotedProductRequest(AdaptyPromotedProduct product) { + PurchaseIntentId = product.PurchaseIntentId; VendorProductId = product.VendorProductId; PayloadData = product.PayloadData; - - var offer = product.Subscription?.Offer; - if (offer != null) - { - Subscription = new AdaptySubscriptionOfferRequest(offer); - } + Subscription = AdaptySubscriptionRequest.From(product.Subscription); } + // iOS needs it to find the StoreKit purchase intent; it is absent only if the event lacked it. + [DataMember(Name = "purchase_intent_id")] + [Preserve] + private string PurchaseIntentId { get; } + [DataMember(Name = "vendor_product_id", IsRequired = true)] [Preserve] private string VendorProductId { get; } @@ -38,6 +39,6 @@ internal AdaptyPromotedProductRequest(AdaptyPromotedProduct product) [DataMember(Name = "subscription")] [Preserve] - private AdaptySubscriptionOfferRequest Subscription { get; } + private AdaptySubscriptionRequest Subscription { get; } } } diff --git a/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionOfferRequest.cs b/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionOfferRequest.cs deleted file mode 100644 index f494bee8..00000000 --- a/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionOfferRequest.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Runtime.Serialization; -using UnityEngine.Scripting; - -namespace AdaptySDK.Serialization -{ - /// - /// How a request writes a subscription offer back to the native side - reduced to its - /// identifier and nested as subscription.offer.offer_identifier, the same envelope for the - /// paywall and promoted product requests. - /// - [DataContract] - [Preserve] - internal sealed class AdaptySubscriptionOfferRequest - { - internal AdaptySubscriptionOfferRequest(AdaptySubscriptionOffer offer) - { - Offer = new OfferEnvelope(new OfferIdentifier(offer.Identifier, offer.Type)); - } - - [DataMember(Name = "offer", IsRequired = true)] - [Preserve] - private OfferEnvelope Offer { get; } - - [DataContract] - private sealed class OfferEnvelope - { - internal OfferEnvelope(OfferIdentifier identifier) - { - Identifier = identifier; - } - - [DataMember(Name = "offer_identifier", IsRequired = true)] - [Preserve] - private OfferIdentifier Identifier { get; } - } - - [DataContract] - private sealed class OfferIdentifier - { - internal OfferIdentifier(string id, AdaptySubscriptionOfferType type) - { - Id = id; - Type = type; - } - - [DataMember(Name = "id")] - [Preserve] - private string Id { get; } - - [DataMember(Name = "type", IsRequired = true)] - [Preserve] - private AdaptySubscriptionOfferType Type { get; } - } - } -} diff --git a/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionRequest.cs b/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionRequest.cs new file mode 100644 index 00000000..70133119 --- /dev/null +++ b/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionRequest.cs @@ -0,0 +1,98 @@ +using System.Runtime.Serialization; +using UnityEngine.Scripting; + +namespace AdaptySDK.Serialization +{ + /// + /// How a request writes a subscription back to the native side - reduced to its billing plan + /// (subscription.pricing_terms.billing_plan_id) and its offer identifier + /// (subscription.offer.offer_identifier), the same envelope for the paywall and promoted + /// product requests. + /// + /// + /// The plan has to go back: without it iOS buys the product up front, whatever plan the + /// product was offered on. + /// + [DataContract] + [Preserve] + internal sealed class AdaptySubscriptionRequest + { + private AdaptySubscriptionRequest(string billingPlan, AdaptySubscriptionOffer offer) + { + if (billingPlan != null) + { + PricingTerms = new PricingTermsEnvelope(billingPlan); + } + if (offer != null) + { + Offer = new OfferEnvelope(new OfferIdentifier(offer.Identifier, offer.Type)); + } + } + + /// + /// Null when the subscription has neither a plan nor an offer, so the request carries no + /// subscription key at all. + /// + internal static AdaptySubscriptionRequest From(AdaptySubscription subscription) + { + var billingPlan = subscription?.PricingTerms?.BillingPlan.RawValue; + var offer = subscription?.Offer; + + return billingPlan == null && offer == null + ? null + : new AdaptySubscriptionRequest(billingPlan, offer); + } + + [DataMember(Name = "pricing_terms")] + [Preserve] + private PricingTermsEnvelope PricingTerms { get; } + + [DataMember(Name = "offer")] + [Preserve] + private OfferEnvelope Offer { get; } + + [DataContract] + private sealed class PricingTermsEnvelope + { + internal PricingTermsEnvelope(string billingPlan) + { + BillingPlan = billingPlan; + } + + [DataMember(Name = "billing_plan_id", IsRequired = true)] + [Preserve] + private string BillingPlan { get; } + } + + [DataContract] + private sealed class OfferEnvelope + { + internal OfferEnvelope(OfferIdentifier identifier) + { + Identifier = identifier; + } + + [DataMember(Name = "offer_identifier", IsRequired = true)] + [Preserve] + private OfferIdentifier Identifier { get; } + } + + [DataContract] + private sealed class OfferIdentifier + { + internal OfferIdentifier(string id, AdaptySubscriptionOfferType type) + { + Id = id; + Type = type; + } + + [DataMember(Name = "id")] + [Preserve] + private string Id { get; } + + [DataMember(Name = "type", IsRequired = true)] + [Preserve] + private AdaptySubscriptionOfferType Type { get; } + } + } +} diff --git a/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionOfferRequest.cs.meta b/Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionRequest.cs.meta similarity index 100% rename from Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionOfferRequest.cs.meta rename to Packages/com.adapty.unity-sdk/Runtime/Serialization/AdaptySubscriptionRequest.cs.meta diff --git a/README.md b/README.md index 5b8dcb8b..3410a95f 100755 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ and a deployment target of 15.0 or newer: AdaptySDK-iOS 4.x is a `swift-tools-ve and an older toolchain refuses to resolve it. Open the exported project as **`Unity-iPhone.xcworkspace`** — building `Unity-iPhone.xcodeproj` directly fails at link time with `ld: framework 'Pods_UnityFramework' not found`. +Selling a subscription on a commitment billing plan (monthly payments over a 12-month +commitment) needs Xcode 26.5 or newer and iOS 26.4 or newer on the device; elsewhere such a +product can only be bought up front. ## Why Adapty? diff --git a/cross_platform.yaml b/cross_platform.yaml index b732676b..022062a2 100644 --- a/cross_platform.yaml +++ b/cross_platform.yaml @@ -1,5 +1,5 @@ $schema: "https://json-schema.org/draft/2020-12/schema" -$id: "https://adapty.io/crossPlatform/4.1.3/schema" +$id: "https://adapty.io/crossPlatform/4.3.1/schema" title: "Cross Platform Format" $requests: @@ -101,11 +101,11 @@ $requests: ### dismissFlowView ### AdaptyUIDismissFlowView.Request: #request type: object - required: [method, id] + required: [method, id, destroy] properties: method: { const: "adapty_ui_dismiss_flow_view" } id: { type: string, description: "View Id" } - destroy: { type: boolean, default: false } + destroy: { type: boolean, description: "Release the view after it is dismissed" } AdaptyUIDismissFlowView.Response: #response type: object @@ -117,6 +117,24 @@ $requests: properties: success: { const: true } + ### destroyFlowView ### + AdaptyUIDestroyFlowView.Request: #request + type: object + required: [method, id] + properties: + method: { const: "adapty_ui_destroy_flow_view" } + id: { type: string, description: "View Id" } + + AdaptyUIDestroyFlowView.Response: #response + type: object + oneOf: + - required: [error] + properties: + error: { $ref: "#/$defs/AdaptyError" } + - required: [success] + properties: + success: { const: true } + ### presentOnboardingView ### AdaptyUIPresentOnboardingView.Request: #request type: object @@ -291,6 +309,47 @@ $requests: properties: success: { $ref: "#/$defs/AdaptyFlow" } + ### preloadFlows ### + PreloadFlows.Request: #request + type: object + required: [method, placement_ids] + properties: + method: { const: "preload_flows" } + placement_ids: + type: array + items: { type: string } + load_timeout: { type: number, description: "seconds" } + + PreloadFlows.Response: #response + type: object + oneOf: + - required: [error] + properties: + error: { $ref: "#/$defs/AdaptyError" } + - required: [success] + properties: + success: { const: true } + + ### preloadFlowsForDefaultAudience ### + PreloadFlowsForDefaultAudience.Request: #request + type: object + required: [method, placement_ids] + properties: + method: { const: "preload_flows_for_default_audience" } + placement_ids: + type: array + items: { type: string } + + PreloadFlowsForDefaultAudience.Response: #response + type: object + oneOf: + - required: [error] + properties: + error: { $ref: "#/$defs/AdaptyError" } + - required: [success] + properties: + success: { const: true } + ### getPaywallProducts ### GetPaywallProducts.Request: #request type: object @@ -308,10 +367,10 @@ $requests: - required: [success] properties: success: - { - type: array, - items: { $ref: "#/$defs/AdaptyPaywallProduct.Response" }, - } + type: array + items: { $ref: "#/$defs/AdaptyPaywallProduct.Response" } + + ### getProfile ### GetProfile.Request: #request @@ -465,6 +524,46 @@ $requests: properties: success: { $ref: "#/$defs/AdaptyPurchaseResult" } + ### getPendingStoreMessageTypes ### + GetPendingStoreMessageTypes.Request: #request + type: object + description: "iOS Only. Requires iOS 16+" + required: [method] + properties: + method: { const: "get_pending_store_message_types" } + + GetPendingStoreMessageTypes.Response: #response + type: object + oneOf: + - required: [error] + properties: + error: { $ref: "#/$defs/AdaptyError" } + - required: [success] + properties: + success: + type: array + items: { $ref: "#/$defs/AdaptyStoreMessageType" } + + ### showStoreMessage ### + ShowStoreMessage.Request: #request + type: object + description: "Requires iOS 16+ on iOS" + required: [method] + properties: + method: { const: "show_store_messages" } + filter: + type: array + items: { $ref: "#/$defs/AdaptyStoreMessageType" } + + ShowStoreMessage.Response: #response + type: object + oneOf: + - required: [error] + properties: + error: { $ref: "#/$defs/AdaptyError" } + - required: [success] + properties: + success: { const: true } OpenWebPaywall.Request: #request type: object required: [method] @@ -1124,7 +1223,34 @@ $defs: Date: #response #request type: string - format: "yyyy-MM-dd'T'HH:mm:ss.SSSZ" + description: | + UTC timestamp in ISO 8601 format. + + Requirements: + - Fractional seconds are required and must contain between 1 and 9 digits. In the `format` property, they are represented by `SSS`; the exact accepted length is defined by the `pattern` property. + - The time zone must be either `Z` or `+0000`. + - `+00:00` and non-zero UTC offsets are not allowed. + + format: "yyyy-MM-dd'T'HH:mm:ss.SSSZ" + Format components: + - `yyyy`: Four-digit year. + - `MM`: Two-digit month (`01`–`12`). + - `dd`: Two-digit day of the month (`01`–`31`). + - `'T'`: Literal separator between the date and time. + - `HH`: Two-digit hour in 24-hour format (`00`–`23`). + - `mm`: Two-digit minute (`00`–`59`). + - `ss`: Two-digit second (`00`–`59`). + - `SSS`: Fractional-seconds field. The accepted value contains between 1 and 9 digits. + - `Z`: Time-zone field. Only `Z` and `+0000` are accepted. + + Format: "yyyy-MM-dd'T'HH:mm:ss.SSSZ" + + Examples: + - 2026-08-24T09:34:24.727Z + - 2026-08-24T09:34:24.727000+0000 + + pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\.[0-9]{1,9}(Z|\+0000)$' + example: '2026-08-24T09:34:24.727000+0000' AdaptyConfiguration: #request type: object @@ -1135,6 +1261,11 @@ $defs: customer_identity_parameters: { $ref: "#/$defs/CustomerIdentityParameters" } observer_mode: { type: boolean, default: false } + store_messages_handling: + { + $ref: "#/$defs/StoreMessagesHandling", + description: "Requires iOS 16+ on iOS", + } apple_idfa_collection_disabled: { type: boolean, default: false } google_adid_collection_disabled: { type: boolean, default: false } google_enable_pending_prepaid_plans: { type: boolean, default: false } @@ -1157,6 +1288,20 @@ $defs: memory_storage_count_limit: { type: integer } disk_storage_size_limit: { type: integer, description: "bytes" } + StoreMessagesHandling: #request + type: string + enum: ["auto", "manual", "default"] + + AdaptyStoreMessageType: #request #response + type: string + anyOf: + - enum: + - generic + - price_increase_consent + - billing_issue + - win_back_offer + - pattern: "^storekit_-?[0-9]+$" + CustomerIdentityParameters: #request type: object properties: @@ -1201,7 +1346,10 @@ $defs: AdaptyPrice: #response type: object - required: [amount] + required: + - amount + - currency_code # iOS Only + - localized_string # iOS Only properties: amount: { type: number } currency_code: { type: string } @@ -1211,12 +1359,19 @@ $defs: AdaptyPromotedProduct.Request: #request type: object required: + - purchase_intent_id # iOS Only - vendor_product_id properties: + purchase_intent_id: { type: string } # iOS Only vendor_product_id: { type: string } subscription: type: object properties: + pricing_terms: # iOS Only + type: object + required: [billing_plan_id] + properties: + billing_plan_id: { type: string } offer: type: object required: [offer_identifier] @@ -1228,12 +1383,14 @@ $defs: AdaptyPromotedProduct.Response: #event type: object required: + - purchase_intent_id # iOS Only - vendor_product_id - localized_description - localized_title - is_family_shareable # iOS Only - price properties: + purchase_intent_id: { type: string } # iOS Only vendor_product_id: { type: string } localized_description: { type: string } localized_title: { type: string } @@ -1244,17 +1401,41 @@ $defs: subscription: { $ref: "#/$defs/AdaptyProduct.Subscription" } payload_data: { type: string } + AdaptySubscriptionPricingTerms: #event #response + type: object + required: + - billing_plan_id + - billing_price + - billing_period + - commitment_info + properties: + billing_plan_id: { type: string } + billing_price: { $ref: "#/$defs/AdaptyPrice" } + billing_period: { $ref: "#/$defs/AdaptySubscriptionPeriod" } + commitment_info: { $ref: "#/$defs/AdaptySubscriptionCommitmentInfo" } + + AdaptySubscriptionCommitmentInfo: #event #response + type: object + required: + - price + - period + properties: + price: { $ref: "#/$defs/AdaptyPrice" } + period: { $ref: "#/$defs/AdaptySubscriptionPeriod" } + AdaptyProduct.Subscription: #event #response type: object required: - group_identifier # iOS Only - period + - pricing_terms # iOS Only - renewal_type # Android Only - base_plan_id # Android Only properties: group_identifier: { type: string, description: "iOS Only" } period: { $ref: "#/$defs/AdaptySubscriptionPeriod" } localized_period: { type: string } + pricing_terms: { $ref: "#/$defs/AdaptySubscriptionPricingTerms" } offer: { $ref: "#/$defs/AdaptySubscriptionOffer" } renewal_type: # Android Only type: string @@ -1285,6 +1466,11 @@ $defs: subscription: type: object properties: + pricing_terms: # iOS Only + type: object + required: [billing_plan_id] + properties: + billing_plan_id: { type: string } offer: type: object required: [offer_identifier] @@ -1366,6 +1552,7 @@ $defs: flow_id: { type: string } flow_name: { type: string } variation_id: { type: string } + variation_name: { type: string } remote_configs: type: array items: { $ref: "#/$defs/AdaptyRemoteConfig" } @@ -1491,10 +1678,18 @@ $defs: adapty_product_id: { type: string } access_level_id: { type: string } product_type: { type: string } - promotional_offer_id: { type: string, description: "iOS Only" } - win_back_offer_id: { type: string, description: "iOS Only" } base_plan_id: { type: string, description: "Android Only" } offer_id: { type: string, description: "Android Only" } + pricing_terms: # iOS only + type: array + items: + type: object + required: + - billing_plan_id # iOS only + properties: + billing_plan_id: { type: string } # iOS only + promotional_offer_id: { type: string } # iOS only + win_back_offer_id: { type: string } # iOS only AdaptySubscriptionPeriod: #response type: object @@ -1572,6 +1767,8 @@ $defs: billing_issue_detected_at: { $ref: "#/$defs/Date" } starts_at: { $ref: "#/$defs/Date" } cancellation_reason: { type: string } + billing_plan_id: { type: string, description: "iOS Only" } + commitment: { $ref: "#/$defs/AdaptyProfile.SubscriptionCommitmentInfo" } is_refund: { type: boolean } AdaptyProfile.NonSubscription: #response @@ -1608,6 +1805,7 @@ $defs: - is_refund - is_sandbox - will_renew + - billing_plan_id # iOS Only properties: store: { type: string } vendor_product_id: { type: string } @@ -1630,6 +1828,16 @@ $defs: active_promotional_offer_id: { type: string } offer_id: { type: string } cancellation_reason: { type: string } + billing_plan_id: { type: string, description: "iOS Only" } + commitment: { $ref: "#/$defs/AdaptyProfile.SubscriptionCommitmentInfo" } + + AdaptyProfile.SubscriptionCommitmentInfo: #response + type: object + required: [billing_period_number, total_billing_periods, expires_at] + properties: + billing_period_number: { type: integer, minimum: 0 } + total_billing_periods: { type: integer, minimum: 0 } + expires_at: { $ref: "#/$defs/Date" } AdaptyProfile.CustomAttributes: type: object @@ -1666,7 +1874,7 @@ $defs: analytics_disabled: { type: boolean } AdaptySubscriptionOffer.Identifier: #request #response - type: string + type: object oneOf: - required: [type] properties: diff --git a/tests/AdaptySDK.NextTests/AndroidPlatformTests.cs b/tests/AdaptySDK.NextTests/AndroidPlatformTests.cs new file mode 100644 index 00000000..ca2ae3ae --- /dev/null +++ b/tests/AdaptySDK.NextTests/AndroidPlatformTests.cs @@ -0,0 +1,29 @@ +#if UNITY_ANDROID +using System.Collections.Generic; +using NUnit.Framework; + +namespace AdaptySDK.NextTests +{ + /// + /// What an iOS-only method answers on Android, where it never reaches the bridge — so it can + /// run on a desktop host, unlike TransportTests. + /// + [TestFixture] + public class AndroidPlatformTests + { + [Test] + public void PendingStoreMessageTypesAreUnknownOnAndroid() + { + var called = false; + IReadOnlyList types = new List(); + AdaptyError error = new AdaptyError(AdaptyErrorCode.Unknown, "not called", null); + + Adapty.GetPendingStoreMessageTypes((value, e) => (called, types, error) = (true, value, e)); + + Assert.That(called, Is.True); + Assert.That(types, Is.Null); + Assert.That(error, Is.Null); + } + } +} +#endif diff --git a/tests/AdaptySDK.NextTests/ContractEnforcementTests.cs b/tests/AdaptySDK.NextTests/ContractEnforcementTests.cs index 89da3730..3a056851 100644 --- a/tests/AdaptySDK.NextTests/ContractEnforcementTests.cs +++ b/tests/AdaptySDK.NextTests/ContractEnforcementTests.cs @@ -34,6 +34,7 @@ public class ContractEnforcementTests [TestCase("onboarding-full", typeof(AdaptyOnboarding))] [TestCase("onboarding-minimal", typeof(AdaptyOnboarding))] [TestCase("purchase-result-success", typeof(AdaptyPurchaseResult))] + [TestCase("promoted-product-full", typeof(AdaptyPromotedProduct))] public void RequiredKeysAreEnforced(string fixture, System.Type type) { var json = Snapshots.LoadResponse(fixture); diff --git a/tests/AdaptySDK.NextTests/RequestParityTests.cs b/tests/AdaptySDK.NextTests/RequestParityTests.cs index cbf9d800..39f46af4 100644 --- a/tests/AdaptySDK.NextTests/RequestParityTests.cs +++ b/tests/AdaptySDK.NextTests/RequestParityTests.cs @@ -157,6 +157,7 @@ public void FetchPolicyWithMaxAge() => [TestCase("products-full", 0, "request-product-with-offer")] [TestCase("products-full", 1, "request-product-plain")] + [TestCase("products-full", 2, "request-product-plan-only")] public void PaywallProduct(string fixture, int index, string snapshot) { var products = AdaptyJson.Deserialize>( diff --git a/tests/AdaptySDK.NextTests/TransportTests.cs b/tests/AdaptySDK.NextTests/TransportTests.cs index a6896eec..ecd93aec 100644 --- a/tests/AdaptySDK.NextTests/TransportTests.cs +++ b/tests/AdaptySDK.NextTests/TransportTests.cs @@ -170,12 +170,17 @@ public void ANullArgumentReportsWrongParamAndSendsNothing() Adapty.GetFlow(null, null, null, (_, error) => reported.Add(error)); Adapty.GetFlowForDefaultAudience(null, null, (_, error) => reported.Add(error)); + Adapty.PreloadFlows(null, error => reported.Add(error)); + Adapty.PreloadFlowsForDefaultAudience(null, error => reported.Add(error)); + Adapty.PreloadFlows(new[] { "onboarding", null }, error => reported.Add(error)); + Adapty.PreloadFlowsForDefaultAudience(new string[] { null }, error => reported.Add(error)); + Adapty.ShowStoreMessages(new AdaptyStoreMessageType[] { null }, error => reported.Add(error)); Adapty.SetIntegrationIdentifier(null, "af-1", error => reported.Add(error)); Adapty.UpdateExternalAttribution("{}", null, error => reported.Add(error)); Assert.Multiple(() => { - Assert.That(reported, Has.Count.EqualTo(4), "a completion handler was never called"); + Assert.That(reported, Has.Count.EqualTo(9), "a completion handler was never called"); Assert.That( reported, Has.All.Matches(error => error?.Code == AdaptyErrorCode.WrongParam) @@ -256,6 +261,44 @@ TestCaseData Case(string name, string method, Action send) => "create_web_paywall_url", () => Adapty.CreateWebPaywallUrl(paywall, (_, __) => { }) ); + yield return Case( + "get-pending-store-message-types", + "get_pending_store_message_types", + () => Adapty.GetPendingStoreMessageTypes((_, __) => { }) + ); + yield return Case( + "show-store-messages", + "show_store_messages", + () => Adapty.ShowStoreMessages(_ => { }) + ); + yield return Case( + "show-store-messages-filtered", + "show_store_messages", + () => Adapty.ShowStoreMessages( + new[] { AdaptyStoreMessageType.BillingIssue, new AdaptyStoreMessageType("storekit_-42") }, + _ => { } + ) + ); + yield return Case( + "show-store-messages-empty-filter", + "show_store_messages", + () => Adapty.ShowStoreMessages(new AdaptyStoreMessageType[0], _ => { }) + ); + yield return Case( + "preload-flows", + "preload_flows", + () => Adapty.PreloadFlows(new[] { "onboarding", "paywall" }, _ => { }) + ); + yield return Case( + "preload-flows-with-timeout", + "preload_flows", + () => Adapty.PreloadFlows(new[] { "onboarding" }, TimeSpan.FromSeconds(2.5), _ => { }) + ); + yield return Case( + "preload-flows-for-default-audience", + "preload_flows_for_default_audience", + () => Adapty.PreloadFlowsForDefaultAudience(new[] { "onboarding" }, _ => { }) + ); yield return Case( "get-paywall-products", "get_paywall_products", @@ -341,6 +384,21 @@ TestCaseData Case(string name, string method, Action send) => "adapty_ui_dismiss_flow_view", () => AdaptyUI.DismissFlowView(flowView, _ => { }) ); + yield return Case( + "dismiss-flow-view-from-view", + "adapty_ui_dismiss_flow_view", + () => flowView.Dismiss(_ => { }) + ); + yield return Case( + "dismiss-flow-view-keep-alive", + "adapty_ui_dismiss_flow_view", + () => flowView.Dismiss(false, _ => { }) + ); + yield return Case( + "destroy-flow-view", + "adapty_ui_destroy_flow_view", + () => flowView.Destroy(_ => { }) + ); yield return Case( "show-dialog", "adapty_ui_show_dialog", @@ -377,6 +435,23 @@ public void RepliesWithoutSuccessAreDecodingErrors(string reply) }); } + /// + /// A kind the SDK names comes back equal to its shared instance, and one it does not is + /// kept as it arrived rather than dropped. + /// + [Test] + public void PendingStoreMessageTypesKeepUnknownKinds() + { + _reply = "{\"success\":[\"billing_issue\",\"storekit_-42\"]}"; + + IReadOnlyList types = null; + Adapty.GetPendingStoreMessageTypes((value, _) => types = value); + + Assert.That(types, Has.Count.EqualTo(2)); + Assert.That(types[0] == AdaptyStoreMessageType.BillingIssue, Is.True); + Assert.That(types[1].RawValue, Is.EqualTo("storekit_-42")); + } + /// /// A native error comes back as an AdaptyError, not as an exception. /// diff --git a/tests/shared/Fixtures/approved/flow-full.android.approved.txt b/tests/shared/Fixtures/approved/flow-full.android.approved.txt index b30df36b..00b10874 100644 --- a/tests/shared/Fixtures/approved/flow-full.android.approved.txt +++ b/tests/shared/Fixtures/approved/flow-full.android.approved.txt @@ -44,10 +44,9 @@ "AndroidBasePlanId": "base-plan-1", "AndroidOfferId": "offer-1", "FlowProductId": "flow-product-1", + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.monthly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.monthly" }, { "$type": "ProductReference", @@ -56,10 +55,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": null, + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.yearly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.yearly" } ], "_WebPurchaseUrl": "https://pay.adapty.io/checkout/abc" @@ -153,6 +151,7 @@ } ], "VariationId": "variation-0001", + "VariationName": "Variation A", "VendorProductIds (property)": [ "com.adapty.sample.monthly", "com.adapty.sample.yearly" @@ -200,10 +199,9 @@ "AndroidBasePlanId": "base-plan-1", "AndroidOfferId": "offer-1", "FlowProductId": "flow-product-1", + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.monthly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.monthly" }, { "$type": "ProductReference", @@ -212,10 +210,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": null, + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.yearly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.yearly" } ], "_WebPurchaseUrl": "https://pay.adapty.io/checkout/abc" diff --git a/tests/shared/Fixtures/approved/flow-full.editor.approved.txt b/tests/shared/Fixtures/approved/flow-full.editor.approved.txt index 9ed91610..edfab761 100644 --- a/tests/shared/Fixtures/approved/flow-full.editor.approved.txt +++ b/tests/shared/Fixtures/approved/flow-full.editor.approved.txt @@ -44,10 +44,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": "flow-product-1", + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.monthly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.monthly" }, { "$type": "ProductReference", @@ -56,10 +55,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": null, + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.yearly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.yearly" } ], "_WebPurchaseUrl": "https://pay.adapty.io/checkout/abc" @@ -153,6 +151,7 @@ } ], "VariationId": "variation-0001", + "VariationName": "Variation A", "VendorProductIds (property)": [ "com.adapty.sample.monthly", "com.adapty.sample.yearly" @@ -200,10 +199,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": "flow-product-1", + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.monthly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.monthly" }, { "$type": "ProductReference", @@ -212,10 +210,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": null, + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.yearly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.yearly" } ], "_WebPurchaseUrl": "https://pay.adapty.io/checkout/abc" diff --git a/tests/shared/Fixtures/approved/flow-full.ios.approved.txt b/tests/shared/Fixtures/approved/flow-full.ios.approved.txt index 05fc9bfb..a9aa582c 100644 --- a/tests/shared/Fixtures/approved/flow-full.ios.approved.txt +++ b/tests/shared/Fixtures/approved/flow-full.ios.approved.txt @@ -44,10 +44,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": "flow-product-1", + "PricingTerms": "[{\"billing_plan_id\":\"monthly\",\"promotional_offer_id\":\"promo-1\"},{\"billing_plan_id\":\"up_front\",\"promotional_offer_id\":\"promo-1\",\"win_back_offer_id\":\"winback-1\",\"future_key\":\"kept as received\"}]", "ProductType": "subscription", - "PromotionalOfferId": "promo-1", - "VendorProductId": "com.adapty.sample.monthly", - "WinBackOfferId": "winback-1" + "VendorProductId": "com.adapty.sample.monthly" }, { "$type": "ProductReference", @@ -56,10 +55,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": null, + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.yearly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.yearly" } ], "_WebPurchaseUrl": "https://pay.adapty.io/checkout/abc" @@ -153,6 +151,7 @@ } ], "VariationId": "variation-0001", + "VariationName": "Variation A", "VendorProductIds (property)": [ "com.adapty.sample.monthly", "com.adapty.sample.yearly" @@ -200,10 +199,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": "flow-product-1", + "PricingTerms": "[{\"billing_plan_id\":\"monthly\",\"promotional_offer_id\":\"promo-1\"},{\"billing_plan_id\":\"up_front\",\"promotional_offer_id\":\"promo-1\",\"win_back_offer_id\":\"winback-1\",\"future_key\":\"kept as received\"}]", "ProductType": "subscription", - "PromotionalOfferId": "promo-1", - "VendorProductId": "com.adapty.sample.monthly", - "WinBackOfferId": "winback-1" + "VendorProductId": "com.adapty.sample.monthly" }, { "$type": "ProductReference", @@ -212,10 +210,9 @@ "AndroidBasePlanId": null, "AndroidOfferId": null, "FlowProductId": null, + "PricingTerms": null, "ProductType": "subscription", - "PromotionalOfferId": null, - "VendorProductId": "com.adapty.sample.yearly", - "WinBackOfferId": null + "VendorProductId": "com.adapty.sample.yearly" } ], "_WebPurchaseUrl": "https://pay.adapty.io/checkout/abc" diff --git a/tests/shared/Fixtures/approved/flow-minimal.android.approved.txt b/tests/shared/Fixtures/approved/flow-minimal.android.approved.txt index 37744274..c035305f 100644 --- a/tests/shared/Fixtures/approved/flow-minimal.android.approved.txt +++ b/tests/shared/Fixtures/approved/flow-minimal.android.approved.txt @@ -17,6 +17,7 @@ "RemoteConfig (property)": null, "RemoteConfigs (property)": [], "VariationId": "variation-0002", + "VariationName": null, "VendorProductIds (property)": [], "_FlowVersionId": null, "_PayloadData": null, diff --git a/tests/shared/Fixtures/approved/flow-minimal.editor.approved.txt b/tests/shared/Fixtures/approved/flow-minimal.editor.approved.txt index 37744274..c035305f 100644 --- a/tests/shared/Fixtures/approved/flow-minimal.editor.approved.txt +++ b/tests/shared/Fixtures/approved/flow-minimal.editor.approved.txt @@ -17,6 +17,7 @@ "RemoteConfig (property)": null, "RemoteConfigs (property)": [], "VariationId": "variation-0002", + "VariationName": null, "VendorProductIds (property)": [], "_FlowVersionId": null, "_PayloadData": null, diff --git a/tests/shared/Fixtures/approved/flow-minimal.ios.approved.txt b/tests/shared/Fixtures/approved/flow-minimal.ios.approved.txt index 37744274..c035305f 100644 --- a/tests/shared/Fixtures/approved/flow-minimal.ios.approved.txt +++ b/tests/shared/Fixtures/approved/flow-minimal.ios.approved.txt @@ -17,6 +17,7 @@ "RemoteConfig (property)": null, "RemoteConfigs (property)": [], "VariationId": "variation-0002", + "VariationName": null, "VendorProductIds (property)": [], "_FlowVersionId": null, "_PayloadData": null, diff --git a/tests/shared/Fixtures/approved/products-full.android.approved.txt b/tests/shared/Fixtures/approved/products-full.android.approved.txt index 4ae4afd8..570cba3f 100644 --- a/tests/shared/Fixtures/approved/products-full.android.approved.txt +++ b/tests/shared/Fixtures/approved/products-full.android.approved.txt @@ -60,6 +60,7 @@ "NumberOfUnits": 1, "Unit": "Month (2)" }, + "PricingTerms": null, "RenewalType": "Prepaid (0)" }, "VendorProductId": "com.adapty.sample.monthly", @@ -91,5 +92,44 @@ "VendorProductId": "com.adapty.sample.lifetime", "_PayloadData": null, "_WebPurchaseUrl": null + }, + { + "$type": "AdaptyPaywallProduct", + "AccessLevelId": "premium", + "AdaptyProductId": "adapty-product-3", + "FlowProductId": null, + "IsFamilyShareable": false, + "LocalizedDescription": "A year of access, paid monthly", + "LocalizedTitle": "Yearly, monthly payments", + "PaywallABTestName": "winter_test", + "PaywallName": "Winter Paywall", + "PaywallProductIndex": 2, + "PaywallVariationId": "variation-0001", + "Price": { + "$type": "AdaptyPrice", + "Amount": 83.88, + "CurrencyCode": "EUR", + "CurrencySymbol": "€", + "LocalizedString": "€83.88" + }, + "ProductType": "subscription", + "RegionCode": null, + "Subscription": { + "$type": "AdaptySubscription", + "BasePlanId": "base-plan-yearly", + "GroupIdentifier": null, + "LocalizedPeriod": "1 year", + "Offer": null, + "Period": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Year (3)" + }, + "PricingTerms": null, + "RenewalType": "Autorenewable (1)" + }, + "VendorProductId": "com.adapty.sample.yearly.monthly", + "_PayloadData": null, + "_WebPurchaseUrl": null } ] diff --git a/tests/shared/Fixtures/approved/products-full.editor.approved.txt b/tests/shared/Fixtures/approved/products-full.editor.approved.txt index 0a73ae16..2f716579 100644 --- a/tests/shared/Fixtures/approved/products-full.editor.approved.txt +++ b/tests/shared/Fixtures/approved/products-full.editor.approved.txt @@ -57,6 +57,7 @@ "NumberOfUnits": 1, "Unit": "Month (2)" }, + "PricingTerms": null, "RenewalType": "Autorenewable (1)" }, "VendorProductId": "com.adapty.sample.monthly", @@ -88,5 +89,44 @@ "VendorProductId": "com.adapty.sample.lifetime", "_PayloadData": null, "_WebPurchaseUrl": null + }, + { + "$type": "AdaptyPaywallProduct", + "AccessLevelId": "premium", + "AdaptyProductId": "adapty-product-3", + "FlowProductId": null, + "IsFamilyShareable": false, + "LocalizedDescription": "A year of access, paid monthly", + "LocalizedTitle": "Yearly, monthly payments", + "PaywallABTestName": "winter_test", + "PaywallName": "Winter Paywall", + "PaywallProductIndex": 2, + "PaywallVariationId": "variation-0001", + "Price": { + "$type": "AdaptyPrice", + "Amount": 83.88, + "CurrencyCode": "EUR", + "CurrencySymbol": "€", + "LocalizedString": "€83.88" + }, + "ProductType": "subscription", + "RegionCode": null, + "Subscription": { + "$type": "AdaptySubscription", + "BasePlanId": null, + "GroupIdentifier": null, + "LocalizedPeriod": "1 year", + "Offer": null, + "Period": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Year (3)" + }, + "PricingTerms": null, + "RenewalType": "Autorenewable (1)" + }, + "VendorProductId": "com.adapty.sample.yearly.monthly", + "_PayloadData": null, + "_WebPurchaseUrl": null } ] diff --git a/tests/shared/Fixtures/approved/products-full.ios.approved.txt b/tests/shared/Fixtures/approved/products-full.ios.approved.txt index dfe13721..e40d0654 100644 --- a/tests/shared/Fixtures/approved/products-full.ios.approved.txt +++ b/tests/shared/Fixtures/approved/products-full.ios.approved.txt @@ -57,6 +57,41 @@ "NumberOfUnits": 1, "Unit": "Month (2)" }, + "PricingTerms": { + "$type": "AdaptySubscriptionPricingTerms", + "BillingPeriod": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Month (2)" + }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "up_front" + }, + "BillingPrice": { + "$type": "AdaptyPrice", + "Amount": 9.99, + "CurrencyCode": "USD", + "CurrencySymbol": null, + "LocalizedString": "$9.99" + }, + "CommitmentInfo": { + "$type": "AdaptySubscriptionCommitmentInfo", + "Period": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Month (2)" + }, + "Price": { + "$type": "AdaptyPrice", + "Amount": 9.99, + "CurrencyCode": "USD", + "CurrencySymbol": null, + "LocalizedString": "$9.99" + } + }, + "_BillingPlan": "up_front" + }, "RenewalType": "Autorenewable (1)" }, "VendorProductId": "com.adapty.sample.monthly", @@ -88,5 +123,78 @@ "VendorProductId": "com.adapty.sample.lifetime", "_PayloadData": null, "_WebPurchaseUrl": null + }, + { + "$type": "AdaptyPaywallProduct", + "AccessLevelId": "premium", + "AdaptyProductId": "adapty-product-3", + "FlowProductId": null, + "IsFamilyShareable": false, + "LocalizedDescription": "A year of access, paid monthly", + "LocalizedTitle": "Yearly, monthly payments", + "PaywallABTestName": "winter_test", + "PaywallName": "Winter Paywall", + "PaywallProductIndex": 2, + "PaywallVariationId": "variation-0001", + "Price": { + "$type": "AdaptyPrice", + "Amount": 83.88, + "CurrencyCode": "EUR", + "CurrencySymbol": "€", + "LocalizedString": "€83.88" + }, + "ProductType": "subscription", + "RegionCode": null, + "Subscription": { + "$type": "AdaptySubscription", + "BasePlanId": null, + "GroupIdentifier": "group-1", + "LocalizedPeriod": "1 year", + "Offer": null, + "Period": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Year (3)" + }, + "PricingTerms": { + "$type": "AdaptySubscriptionPricingTerms", + "BillingPeriod": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Month (2)" + }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, + "BillingPrice": { + "$type": "AdaptyPrice", + "Amount": 6.99, + "CurrencyCode": "EUR", + "CurrencySymbol": null, + "LocalizedString": "€6.99" + }, + "CommitmentInfo": { + "$type": "AdaptySubscriptionCommitmentInfo", + "Period": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Year (3)" + }, + "Price": { + "$type": "AdaptyPrice", + "Amount": 83.88, + "CurrencyCode": "EUR", + "CurrencySymbol": null, + "LocalizedString": "€83.88" + } + }, + "_BillingPlan": "monthly" + }, + "RenewalType": "Autorenewable (1)" + }, + "VendorProductId": "com.adapty.sample.yearly.monthly", + "_PayloadData": null, + "_WebPurchaseUrl": null } ] diff --git a/tests/shared/Fixtures/approved/profile-full.android.approved.txt b/tests/shared/Fixtures/approved/profile-full.android.approved.txt index a52c519a..3754d156 100644 --- a/tests/shared/Fixtures/approved/profile-full.android.approved.txt +++ b/tests/shared/Fixtures/approved/profile-full.android.approved.txt @@ -8,7 +8,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.0000000Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "Id": "premium", "IsActive": true, @@ -21,7 +31,8 @@ "Store": "app_store", "UnsubscribedAt": { "utc": "2026-07-20T10:00:00.0000000Z", "kind": "Local" }, "VendorProductId": "com.adapty.sample.monthly", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" } }, "AppliedExternalAttributionProviders (property)": [ @@ -65,7 +76,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.1234568Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "IsActive": true, "IsInGracePeriod": false, @@ -80,7 +101,35 @@ "VendorOriginalTransactionId": "2000000000000001", "VendorProductId": "com.adapty.sample.monthly", "VendorTransactionId": "2000000123456789", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" + }, + "com.adapty.sample.yearly:base-plan-yearly": { + "$type": "Subscription", + "ActivatedAt": { "utc": "2025-03-01T08:00:00.0000000Z", "kind": "Local" }, + "ActiveIntroductoryOfferType": null, + "ActivePromotionalOfferId": null, + "ActivePromotionalOfferType": null, + "BillingIssueDetectedAt": null, + "BillingPlan (property)": null, + "CancellationReason": null, + "CommitmentInfo": null, + "ExpiresAt": { "utc": "2026-03-01T08:00:00.0000000Z", "kind": "Local" }, + "IsActive": false, + "IsInGracePeriod": false, + "IsLifetime": false, + "IsRefund": false, + "IsSandbox": false, + "OfferId": "offer-yearly-intro", + "RenewedAt": null, + "StartsAt": null, + "Store": "play_store", + "UnsubscribedAt": null, + "VendorOriginalTransactionId": "GPA.3300-0000-0000-00001", + "VendorProductId": "com.adapty.sample.yearly:base-plan-yearly", + "VendorTransactionId": "GPA.3300-0000-0000-00001", + "WillRenew": false, + "_BillingPlan": null } }, "Version": 1753876800000, @@ -92,7 +141,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.0000000Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "Id": "premium", "IsActive": true, @@ -105,7 +164,8 @@ "Store": "app_store", "UnsubscribedAt": { "utc": "2026-07-20T10:00:00.0000000Z", "kind": "Local" }, "VendorProductId": "com.adapty.sample.monthly", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" } }, "_AppliedExternalAttributionProviders": [ @@ -139,7 +199,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.1234568Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "IsActive": true, "IsInGracePeriod": false, @@ -154,7 +224,35 @@ "VendorOriginalTransactionId": "2000000000000001", "VendorProductId": "com.adapty.sample.monthly", "VendorTransactionId": "2000000123456789", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" + }, + "com.adapty.sample.yearly:base-plan-yearly": { + "$type": "Subscription", + "ActivatedAt": { "utc": "2025-03-01T08:00:00.0000000Z", "kind": "Local" }, + "ActiveIntroductoryOfferType": null, + "ActivePromotionalOfferId": null, + "ActivePromotionalOfferType": null, + "BillingIssueDetectedAt": null, + "BillingPlan (property)": null, + "CancellationReason": null, + "CommitmentInfo": null, + "ExpiresAt": { "utc": "2026-03-01T08:00:00.0000000Z", "kind": "Local" }, + "IsActive": false, + "IsInGracePeriod": false, + "IsLifetime": false, + "IsRefund": false, + "IsSandbox": false, + "OfferId": "offer-yearly-intro", + "RenewedAt": null, + "StartsAt": null, + "Store": "play_store", + "UnsubscribedAt": null, + "VendorOriginalTransactionId": "GPA.3300-0000-0000-00001", + "VendorProductId": "com.adapty.sample.yearly:base-plan-yearly", + "VendorTransactionId": "GPA.3300-0000-0000-00001", + "WillRenew": false, + "_BillingPlan": null } } } diff --git a/tests/shared/Fixtures/approved/profile-full.editor.approved.txt b/tests/shared/Fixtures/approved/profile-full.editor.approved.txt index a52c519a..3754d156 100644 --- a/tests/shared/Fixtures/approved/profile-full.editor.approved.txt +++ b/tests/shared/Fixtures/approved/profile-full.editor.approved.txt @@ -8,7 +8,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.0000000Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "Id": "premium", "IsActive": true, @@ -21,7 +31,8 @@ "Store": "app_store", "UnsubscribedAt": { "utc": "2026-07-20T10:00:00.0000000Z", "kind": "Local" }, "VendorProductId": "com.adapty.sample.monthly", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" } }, "AppliedExternalAttributionProviders (property)": [ @@ -65,7 +76,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.1234568Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "IsActive": true, "IsInGracePeriod": false, @@ -80,7 +101,35 @@ "VendorOriginalTransactionId": "2000000000000001", "VendorProductId": "com.adapty.sample.monthly", "VendorTransactionId": "2000000123456789", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" + }, + "com.adapty.sample.yearly:base-plan-yearly": { + "$type": "Subscription", + "ActivatedAt": { "utc": "2025-03-01T08:00:00.0000000Z", "kind": "Local" }, + "ActiveIntroductoryOfferType": null, + "ActivePromotionalOfferId": null, + "ActivePromotionalOfferType": null, + "BillingIssueDetectedAt": null, + "BillingPlan (property)": null, + "CancellationReason": null, + "CommitmentInfo": null, + "ExpiresAt": { "utc": "2026-03-01T08:00:00.0000000Z", "kind": "Local" }, + "IsActive": false, + "IsInGracePeriod": false, + "IsLifetime": false, + "IsRefund": false, + "IsSandbox": false, + "OfferId": "offer-yearly-intro", + "RenewedAt": null, + "StartsAt": null, + "Store": "play_store", + "UnsubscribedAt": null, + "VendorOriginalTransactionId": "GPA.3300-0000-0000-00001", + "VendorProductId": "com.adapty.sample.yearly:base-plan-yearly", + "VendorTransactionId": "GPA.3300-0000-0000-00001", + "WillRenew": false, + "_BillingPlan": null } }, "Version": 1753876800000, @@ -92,7 +141,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.0000000Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "Id": "premium", "IsActive": true, @@ -105,7 +164,8 @@ "Store": "app_store", "UnsubscribedAt": { "utc": "2026-07-20T10:00:00.0000000Z", "kind": "Local" }, "VendorProductId": "com.adapty.sample.monthly", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" } }, "_AppliedExternalAttributionProviders": [ @@ -139,7 +199,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.1234568Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "IsActive": true, "IsInGracePeriod": false, @@ -154,7 +224,35 @@ "VendorOriginalTransactionId": "2000000000000001", "VendorProductId": "com.adapty.sample.monthly", "VendorTransactionId": "2000000123456789", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" + }, + "com.adapty.sample.yearly:base-plan-yearly": { + "$type": "Subscription", + "ActivatedAt": { "utc": "2025-03-01T08:00:00.0000000Z", "kind": "Local" }, + "ActiveIntroductoryOfferType": null, + "ActivePromotionalOfferId": null, + "ActivePromotionalOfferType": null, + "BillingIssueDetectedAt": null, + "BillingPlan (property)": null, + "CancellationReason": null, + "CommitmentInfo": null, + "ExpiresAt": { "utc": "2026-03-01T08:00:00.0000000Z", "kind": "Local" }, + "IsActive": false, + "IsInGracePeriod": false, + "IsLifetime": false, + "IsRefund": false, + "IsSandbox": false, + "OfferId": "offer-yearly-intro", + "RenewedAt": null, + "StartsAt": null, + "Store": "play_store", + "UnsubscribedAt": null, + "VendorOriginalTransactionId": "GPA.3300-0000-0000-00001", + "VendorProductId": "com.adapty.sample.yearly:base-plan-yearly", + "VendorTransactionId": "GPA.3300-0000-0000-00001", + "WillRenew": false, + "_BillingPlan": null } } } diff --git a/tests/shared/Fixtures/approved/profile-full.ios.approved.txt b/tests/shared/Fixtures/approved/profile-full.ios.approved.txt index a52c519a..3754d156 100644 --- a/tests/shared/Fixtures/approved/profile-full.ios.approved.txt +++ b/tests/shared/Fixtures/approved/profile-full.ios.approved.txt @@ -8,7 +8,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.0000000Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "Id": "premium", "IsActive": true, @@ -21,7 +31,8 @@ "Store": "app_store", "UnsubscribedAt": { "utc": "2026-07-20T10:00:00.0000000Z", "kind": "Local" }, "VendorProductId": "com.adapty.sample.monthly", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" } }, "AppliedExternalAttributionProviders (property)": [ @@ -65,7 +76,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.1234568Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "IsActive": true, "IsInGracePeriod": false, @@ -80,7 +101,35 @@ "VendorOriginalTransactionId": "2000000000000001", "VendorProductId": "com.adapty.sample.monthly", "VendorTransactionId": "2000000123456789", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" + }, + "com.adapty.sample.yearly:base-plan-yearly": { + "$type": "Subscription", + "ActivatedAt": { "utc": "2025-03-01T08:00:00.0000000Z", "kind": "Local" }, + "ActiveIntroductoryOfferType": null, + "ActivePromotionalOfferId": null, + "ActivePromotionalOfferType": null, + "BillingIssueDetectedAt": null, + "BillingPlan (property)": null, + "CancellationReason": null, + "CommitmentInfo": null, + "ExpiresAt": { "utc": "2026-03-01T08:00:00.0000000Z", "kind": "Local" }, + "IsActive": false, + "IsInGracePeriod": false, + "IsLifetime": false, + "IsRefund": false, + "IsSandbox": false, + "OfferId": "offer-yearly-intro", + "RenewedAt": null, + "StartsAt": null, + "Store": "play_store", + "UnsubscribedAt": null, + "VendorOriginalTransactionId": "GPA.3300-0000-0000-00001", + "VendorProductId": "com.adapty.sample.yearly:base-plan-yearly", + "VendorTransactionId": "GPA.3300-0000-0000-00001", + "WillRenew": false, + "_BillingPlan": null } }, "Version": 1753876800000, @@ -92,7 +141,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.0000000Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "Id": "premium", "IsActive": true, @@ -105,7 +164,8 @@ "Store": "app_store", "UnsubscribedAt": { "utc": "2026-07-20T10:00:00.0000000Z", "kind": "Local" }, "VendorProductId": "com.adapty.sample.monthly", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" } }, "_AppliedExternalAttributionProviders": [ @@ -139,7 +199,17 @@ "ActivePromotionalOfferId": "promo-winter", "ActivePromotionalOfferType": "promotional", "BillingIssueDetectedAt": { "utc": "2026-07-19T10:00:00.0000000Z", "kind": "Local" }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "monthly" + }, "CancellationReason": "voluntarily_cancelled", + "CommitmentInfo": { + "$type": "SubscriptionCommitmentInfo", + "BillingPeriodNumber": 7, + "ExpiresAt": { "utc": "2027-01-15T09:30:00.1234568Z", "kind": "Local" }, + "TotalBillingPeriods": 12 + }, "ExpiresAt": { "utc": "2026-08-15T09:30:00.0000000Z", "kind": "Local" }, "IsActive": true, "IsInGracePeriod": false, @@ -154,7 +224,35 @@ "VendorOriginalTransactionId": "2000000000000001", "VendorProductId": "com.adapty.sample.monthly", "VendorTransactionId": "2000000123456789", - "WillRenew": true + "WillRenew": true, + "_BillingPlan": "monthly" + }, + "com.adapty.sample.yearly:base-plan-yearly": { + "$type": "Subscription", + "ActivatedAt": { "utc": "2025-03-01T08:00:00.0000000Z", "kind": "Local" }, + "ActiveIntroductoryOfferType": null, + "ActivePromotionalOfferId": null, + "ActivePromotionalOfferType": null, + "BillingIssueDetectedAt": null, + "BillingPlan (property)": null, + "CancellationReason": null, + "CommitmentInfo": null, + "ExpiresAt": { "utc": "2026-03-01T08:00:00.0000000Z", "kind": "Local" }, + "IsActive": false, + "IsInGracePeriod": false, + "IsLifetime": false, + "IsRefund": false, + "IsSandbox": false, + "OfferId": "offer-yearly-intro", + "RenewedAt": null, + "StartsAt": null, + "Store": "play_store", + "UnsubscribedAt": null, + "VendorOriginalTransactionId": "GPA.3300-0000-0000-00001", + "VendorProductId": "com.adapty.sample.yearly:base-plan-yearly", + "VendorTransactionId": "GPA.3300-0000-0000-00001", + "WillRenew": false, + "_BillingPlan": null } } } diff --git a/tests/shared/Fixtures/approved/promoted-product-full.android.approved.txt b/tests/shared/Fixtures/approved/promoted-product-full.android.approved.txt index 48b90dda..52d2ef14 100644 --- a/tests/shared/Fixtures/approved/promoted-product-full.android.approved.txt +++ b/tests/shared/Fixtures/approved/promoted-product-full.android.approved.txt @@ -48,8 +48,10 @@ "NumberOfUnits": 1, "Unit": "Month (2)" }, + "PricingTerms": null, "RenewalType": "Autorenewable (1)" }, "VendorProductId": "com.adapty.sample.monthly", - "_PayloadData": "{\"custom\":\"promoted payload\"}" + "_PayloadData": "{\"custom\":\"promoted payload\"}", + "_PurchaseIntentId": "intent-1" } diff --git a/tests/shared/Fixtures/approved/promoted-product-full.editor.approved.txt b/tests/shared/Fixtures/approved/promoted-product-full.editor.approved.txt index 06d3c252..e5857c07 100644 --- a/tests/shared/Fixtures/approved/promoted-product-full.editor.approved.txt +++ b/tests/shared/Fixtures/approved/promoted-product-full.editor.approved.txt @@ -48,8 +48,10 @@ "NumberOfUnits": 1, "Unit": "Month (2)" }, + "PricingTerms": null, "RenewalType": "Autorenewable (1)" }, "VendorProductId": "com.adapty.sample.monthly", - "_PayloadData": "{\"custom\":\"promoted payload\"}" + "_PayloadData": "{\"custom\":\"promoted payload\"}", + "_PurchaseIntentId": "intent-1" } diff --git a/tests/shared/Fixtures/approved/promoted-product-full.ios.approved.txt b/tests/shared/Fixtures/approved/promoted-product-full.ios.approved.txt index 1273196d..efb99dc5 100644 --- a/tests/shared/Fixtures/approved/promoted-product-full.ios.approved.txt +++ b/tests/shared/Fixtures/approved/promoted-product-full.ios.approved.txt @@ -48,8 +48,44 @@ "NumberOfUnits": 1, "Unit": "Month (2)" }, + "PricingTerms": { + "$type": "AdaptySubscriptionPricingTerms", + "BillingPeriod": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Month (2)" + }, + "BillingPlan (property)": { + "$type": "AdaptySubscriptionBillingPlan", + "RawValue": "up_front" + }, + "BillingPrice": { + "$type": "AdaptyPrice", + "Amount": 9.99, + "CurrencyCode": "USD", + "CurrencySymbol": null, + "LocalizedString": "$9.99" + }, + "CommitmentInfo": { + "$type": "AdaptySubscriptionCommitmentInfo", + "Period": { + "$type": "AdaptySubscriptionPeriod", + "NumberOfUnits": 1, + "Unit": "Month (2)" + }, + "Price": { + "$type": "AdaptyPrice", + "Amount": 9.99, + "CurrencyCode": "USD", + "CurrencySymbol": null, + "LocalizedString": "$9.99" + } + }, + "_BillingPlan": "up_front" + }, "RenewalType": "Autorenewable (1)" }, "VendorProductId": "com.adapty.sample.monthly", - "_PayloadData": "{\"custom\":\"promoted payload\"}" + "_PayloadData": "{\"custom\":\"promoted payload\"}", + "_PurchaseIntentId": "intent-1" } diff --git a/tests/shared/Fixtures/approved/promoted-product-minimal.android.approved.txt b/tests/shared/Fixtures/approved/promoted-product-minimal.android.approved.txt index 911b8720..7596abc9 100644 --- a/tests/shared/Fixtures/approved/promoted-product-minimal.android.approved.txt +++ b/tests/shared/Fixtures/approved/promoted-product-minimal.android.approved.txt @@ -13,5 +13,6 @@ "RegionCode": null, "Subscription": null, "VendorProductId": "com.adapty.sample.lifetime", - "_PayloadData": null + "_PayloadData": null, + "_PurchaseIntentId": null } diff --git a/tests/shared/Fixtures/approved/promoted-product-minimal.editor.approved.txt b/tests/shared/Fixtures/approved/promoted-product-minimal.editor.approved.txt index 911b8720..7596abc9 100644 --- a/tests/shared/Fixtures/approved/promoted-product-minimal.editor.approved.txt +++ b/tests/shared/Fixtures/approved/promoted-product-minimal.editor.approved.txt @@ -13,5 +13,6 @@ "RegionCode": null, "Subscription": null, "VendorProductId": "com.adapty.sample.lifetime", - "_PayloadData": null + "_PayloadData": null, + "_PurchaseIntentId": null } diff --git a/tests/shared/Fixtures/approved/promoted-product-minimal.ios.approved.txt b/tests/shared/Fixtures/approved/promoted-product-minimal.ios.approved.txt index 911b8720..7596abc9 100644 --- a/tests/shared/Fixtures/approved/promoted-product-minimal.ios.approved.txt +++ b/tests/shared/Fixtures/approved/promoted-product-minimal.ios.approved.txt @@ -13,5 +13,6 @@ "RegionCode": null, "Subscription": null, "VendorProductId": "com.adapty.sample.lifetime", - "_PayloadData": null + "_PayloadData": null, + "_PurchaseIntentId": null } diff --git a/tests/shared/Fixtures/approved/public-surface.android.approved.txt b/tests/shared/Fixtures/approved/public-surface.android.approved.txt index 8f103239..a440fdfc 100644 --- a/tests/shared/Fixtures/approved/public-surface.android.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.android.approved.txt @@ -35,6 +35,8 @@ public AdaptySDK.AdaptyConfiguration+Builder.SetGoogleLocalAccessLevelAllowed(Sy public AdaptySDK.AdaptyConfiguration+Builder.SetIPAddressCollectionDisabled(System.Boolean ipAddressCollectionDisabled) : AdaptySDK.Builder public AdaptySDK.AdaptyConfiguration+Builder.SetObserverMode(System.Boolean observerMode) : AdaptySDK.Builder public AdaptySDK.AdaptyConfiguration+Builder.SetServerCluster(AdaptySDK.AdaptyServerCluster serverCluster) : AdaptySDK.Builder +public AdaptySDK.AdaptyConfiguration+Builder.SetStoreMessagesHandling(AdaptySDK.AdaptyStoreMessagesHandling storeMessagesHandling) : AdaptySDK.Builder +public AdaptySDK.AdaptyConfiguration+Builder.StoreMessagesHandling : System.Nullable public AdaptySDK.AdaptyConfiguration+Builder.ctor(System.String apiKey) public AdaptySDK.AdaptyCustomAssetColor.ColorValue : UnityEngine.Color { get; } public AdaptySDK.AdaptyCustomAssetLinearGradient.Gradient : UnityEngine.Gradient { get; } @@ -76,6 +78,8 @@ public AdaptySDK.AdaptyOnboardingsSelectParams.ctor(System.String id, System.Str public AdaptySDK.AdaptyOnboardingsTextInput.ctor(System.String value) public AdaptySDK.AdaptyPaymentMode.value__ : System.Int32 public AdaptySDK.AdaptyProductIdentifier.ctor(System.String vendorProductId, System.String adaptyProductId, System.String basePlanId) +public AdaptySDK.AdaptyProfile+AccessLevel.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } +public AdaptySDK.AdaptyProfile+Subscription.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } public AdaptySDK.AdaptyProfile.AccessLevels : System.Collections.Generic.IReadOnlyDictionary { get; } public AdaptySDK.AdaptyProfile.AppliedExternalAttributionProviders : System.Collections.Generic.IReadOnlyList { get; } public AdaptySDK.AdaptyProfile.CustomAttributes : System.Collections.Generic.IReadOnlyDictionary { get; } @@ -117,8 +121,12 @@ public AdaptySDK.AdaptyPurchaseResultType.value__ : System.Int32 public AdaptySDK.AdaptyRefundPreference.value__ : System.Int32 public AdaptySDK.AdaptyRemoteConfig.Dictionary : System.Collections.Generic.IReadOnlyDictionary { get; } public AdaptySDK.AdaptyServerCluster.value__ : System.Int32 +public AdaptySDK.AdaptyStoreMessageType.ctor(System.String rawValue) +public AdaptySDK.AdaptyStoreMessagesHandling.value__ : System.Int32 +public AdaptySDK.AdaptySubscriptionBillingPlan.ctor(System.String rawValue) public AdaptySDK.AdaptySubscriptionOfferType.value__ : System.Int32 public AdaptySDK.AdaptySubscriptionPeriodUnit.value__ : System.Int32 +public AdaptySDK.AdaptySubscriptionPricingTerms.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } public AdaptySDK.AdaptySubscriptionRenewalType.value__ : System.Int32 public AdaptySDK.AdaptySubscriptionUpdateParameters.OldSubVendorProductId : System.String public AdaptySDK.AdaptySubscriptionUpdateParameters.ReplacementMode : AdaptySDK.AdaptySubscriptionUpdateReplacementMode @@ -153,7 +161,9 @@ public AdaptySDK.AdaptyUIDialogConfiguration.SetSecondaryActionTitle(System.Stri public AdaptySDK.AdaptyUIDialogConfiguration.SetTitle(System.String title) : AdaptySDK.AdaptyUIDialogConfiguration public AdaptySDK.AdaptyUIDialogConfiguration.Title : System.String public AdaptySDK.AdaptyUIDialogConfiguration.ctor() +public AdaptySDK.AdaptyUIFlowView.Destroy(System.Action completionHandler) : System.Void public AdaptySDK.AdaptyUIFlowView.Dismiss(System.Action completionHandler) : System.Void +public AdaptySDK.AdaptyUIFlowView.Dismiss(System.Boolean destroy, System.Action completionHandler) : System.Void public AdaptySDK.AdaptyUIFlowView.Id : System.String public AdaptySDK.AdaptyUIFlowView.Locale : System.String public AdaptySDK.AdaptyUIFlowView.PlacementId : System.String @@ -218,6 +228,7 @@ public enum AdaptySDK.AdaptyProfileGender : System.IComparable, System.IConverti public enum AdaptySDK.AdaptyPurchaseResultType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptyRefundPreference : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptyServerCluster : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable +public enum AdaptySDK.AdaptyStoreMessagesHandling : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionOfferType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionPeriodUnit : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionRenewalType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable @@ -257,15 +268,24 @@ public override AdaptySDK.AdaptyProductIdentifier.ToString() : System.String public override AdaptySDK.AdaptyProfile+AccessLevel.ToString() : System.String public override AdaptySDK.AdaptyProfile+NonSubscription.ToString() : System.String public override AdaptySDK.AdaptyProfile+Subscription.ToString() : System.String +public override AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.ToString() : System.String public override AdaptySDK.AdaptyProfile.ToString() : System.String public override AdaptySDK.AdaptyProfileParameters.ToString() : System.String public override AdaptySDK.AdaptyPromotedProduct.ToString() : System.String public override AdaptySDK.AdaptyPurchaseParameters.ToString() : System.String public override AdaptySDK.AdaptyPurchaseResult.ToString() : System.String +public override AdaptySDK.AdaptyStoreMessageType.Equals(System.Object obj) : System.Boolean +public override AdaptySDK.AdaptyStoreMessageType.GetHashCode() : System.Int32 +public override AdaptySDK.AdaptyStoreMessageType.ToString() : System.String public override AdaptySDK.AdaptySubscription.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionBillingPlan.Equals(System.Object obj) : System.Boolean +public override AdaptySDK.AdaptySubscriptionBillingPlan.GetHashCode() : System.Int32 +public override AdaptySDK.AdaptySubscriptionBillingPlan.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionCommitmentInfo.ToString() : System.String public override AdaptySDK.AdaptySubscriptionOffer.ToString() : System.String public override AdaptySDK.AdaptySubscriptionPeriod.ToString() : System.String public override AdaptySDK.AdaptySubscriptionPhase.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionPricingTerms.ToString() : System.String public override AdaptySDK.AdaptySubscriptionUpdateParameters.ToString() : System.String public override AdaptySDK.AdaptyUICreateFlowViewParameters.ToString() : System.String public override AdaptySDK.AdaptyUIDialogConfiguration.ToString() : System.String @@ -284,6 +304,7 @@ public readonly AdaptySDK.AdaptyFlow.InstanceIdentity : System.String public readonly AdaptySDK.AdaptyFlow.Name : System.String public readonly AdaptySDK.AdaptyFlow.Placement : AdaptySDK.AdaptyPlacement public readonly AdaptySDK.AdaptyFlow.VariationId : System.String +public readonly AdaptySDK.AdaptyFlow.VariationName : System.String public readonly AdaptySDK.AdaptyFlowPaywall.InstanceIdentity : System.String public readonly AdaptySDK.AdaptyFlowPaywall.Name : System.String public readonly AdaptySDK.AdaptyFlowPaywall.Placement : AdaptySDK.AdaptyPlacement @@ -345,6 +366,7 @@ public readonly AdaptySDK.AdaptyProfile+AccessLevel.ActivePromotionalOfferId : S public readonly AdaptySDK.AdaptyProfile+AccessLevel.ActivePromotionalOfferType : System.String public readonly AdaptySDK.AdaptyProfile+AccessLevel.BillingIssueDetectedAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+AccessLevel.CancellationReason : System.String +public readonly AdaptySDK.AdaptyProfile+AccessLevel.CommitmentInfo : AdaptySDK.SubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyProfile+AccessLevel.ExpiresAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+AccessLevel.Id : System.String public readonly AdaptySDK.AdaptyProfile+AccessLevel.IsActive : System.Boolean @@ -372,6 +394,7 @@ public readonly AdaptySDK.AdaptyProfile+Subscription.ActivePromotionalOfferId : public readonly AdaptySDK.AdaptyProfile+Subscription.ActivePromotionalOfferType : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.BillingIssueDetectedAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+Subscription.CancellationReason : System.String +public readonly AdaptySDK.AdaptyProfile+Subscription.CommitmentInfo : AdaptySDK.SubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyProfile+Subscription.ExpiresAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+Subscription.IsActive : System.Boolean public readonly AdaptySDK.AdaptyProfile+Subscription.IsInGracePeriod : System.Boolean @@ -387,6 +410,9 @@ public readonly AdaptySDK.AdaptyProfile+Subscription.VendorOriginalTransactionId public readonly AdaptySDK.AdaptyProfile+Subscription.VendorProductId : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.VendorTransactionId : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.WillRenew : System.Boolean +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.BillingPeriodNumber : System.Int32 +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.ExpiresAt : System.DateTime +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.TotalBillingPeriods : System.Int32 public readonly AdaptySDK.AdaptyProfile.CustomerUserId : System.String public readonly AdaptySDK.AdaptyProfile.ProfileId : System.String public readonly AdaptySDK.AdaptyPromotedProduct.IsFamilyShareable : System.Boolean @@ -404,12 +430,17 @@ public readonly AdaptySDK.AdaptyPurchaseResult.Profile : AdaptySDK.AdaptyProfile public readonly AdaptySDK.AdaptyPurchaseResult.Type : AdaptySDK.AdaptyPurchaseResultType public readonly AdaptySDK.AdaptyRemoteConfig.Data : System.String public readonly AdaptySDK.AdaptyRemoteConfig.Locale : System.String +public readonly AdaptySDK.AdaptyStoreMessageType.RawValue : System.String public readonly AdaptySDK.AdaptySubscription.BasePlanId : System.String public readonly AdaptySDK.AdaptySubscription.GroupIdentifier : System.String public readonly AdaptySDK.AdaptySubscription.LocalizedPeriod : System.String public readonly AdaptySDK.AdaptySubscription.Offer : AdaptySDK.AdaptySubscriptionOffer public readonly AdaptySDK.AdaptySubscription.Period : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscription.PricingTerms : AdaptySDK.AdaptySubscriptionPricingTerms public readonly AdaptySDK.AdaptySubscription.RenewalType : AdaptySDK.AdaptySubscriptionRenewalType +public readonly AdaptySDK.AdaptySubscriptionBillingPlan.RawValue : System.String +public readonly AdaptySDK.AdaptySubscriptionCommitmentInfo.Period : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionCommitmentInfo.Price : AdaptySDK.AdaptyPrice public readonly AdaptySDK.AdaptySubscriptionOffer.Identifier : System.String public readonly AdaptySDK.AdaptySubscriptionOffer.OfferTags : System.Collections.Generic.IReadOnlyList public readonly AdaptySDK.AdaptySubscriptionOffer.Phases : System.Collections.Generic.IReadOnlyList @@ -422,6 +453,9 @@ public readonly AdaptySDK.AdaptySubscriptionPhase.NumberOfPeriods : System.Int32 public readonly AdaptySDK.AdaptySubscriptionPhase.PaymentMode : AdaptySDK.AdaptyPaymentMode public readonly AdaptySDK.AdaptySubscriptionPhase.Price : AdaptySDK.AdaptyPrice public readonly AdaptySDK.AdaptySubscriptionPhase.SubscriptionPeriod : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.BillingPeriod : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.BillingPrice : AdaptySDK.AdaptyPrice +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.CommitmentInfo : AdaptySDK.AdaptySubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyUIOnboardingMeta.OnboardingId : System.String public readonly AdaptySDK.AdaptyUIOnboardingMeta.ScreenClientId : System.String public readonly AdaptySDK.AdaptyUIOnboardingMeta.ScreenIndex : System.Int32 @@ -468,6 +502,7 @@ public sealed class AdaptySDK.AdaptyProfile public sealed class AdaptySDK.AdaptyProfile+AccessLevel public sealed class AdaptySDK.AdaptyProfile+NonSubscription public sealed class AdaptySDK.AdaptyProfile+Subscription +public sealed class AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo public sealed class AdaptySDK.AdaptyProfileParameters public sealed class AdaptySDK.AdaptyProfileParameters+Builder public sealed class AdaptySDK.AdaptyPromotedProduct @@ -475,10 +510,14 @@ public sealed class AdaptySDK.AdaptyPurchaseParameters public sealed class AdaptySDK.AdaptyPurchaseParametersBuilder public sealed class AdaptySDK.AdaptyPurchaseResult public sealed class AdaptySDK.AdaptyRemoteConfig +public sealed class AdaptySDK.AdaptyStoreMessageType : System.IEquatable public sealed class AdaptySDK.AdaptySubscription +public sealed class AdaptySDK.AdaptySubscriptionBillingPlan : System.IEquatable +public sealed class AdaptySDK.AdaptySubscriptionCommitmentInfo public sealed class AdaptySDK.AdaptySubscriptionOffer public sealed class AdaptySDK.AdaptySubscriptionPeriod public sealed class AdaptySDK.AdaptySubscriptionPhase +public sealed class AdaptySDK.AdaptySubscriptionPricingTerms public sealed class AdaptySDK.AdaptySubscriptionUpdateParameters public sealed class AdaptySDK.AdaptyUICreateFlowViewParameters public sealed class AdaptySDK.AdaptyUIDialogConfiguration @@ -505,6 +544,7 @@ public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String pla public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String placementId, System.String locale, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String placementId, System.String locale, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetPaywallProducts(AdaptySDK.AdaptyFlow flow, System.Action, AdaptySDK.AdaptyError> completionHandler) : System.Void +public static AdaptySDK.Adapty.GetPendingStoreMessageTypes(System.Action, AdaptySDK.AdaptyError> completionHandler) : System.Void public static AdaptySDK.Adapty.GetProfile(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.Identify(System.String customerUserId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.Identify(System.String customerUserId, System.Guid iosAppAccountToken, System.String androidObfuscatedAccountId, System.Action completionHandler) : System.Void @@ -518,6 +558,9 @@ public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyFlowPaywall paywal public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyFlowPaywall paywall, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyPaywallProduct product, AdaptySDK.AdaptyWebPresentation openIn, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyPaywallProduct product, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlows(System.Collections.Generic.IReadOnlyList placementIds, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlows(System.Collections.Generic.IReadOnlyList placementIds, System.Nullable loadTimeout, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlowsForDefaultAudience(System.Collections.Generic.IReadOnlyList placementIds, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.PresentCodeRedemptionSheet(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.Action completionHandler) : System.Void @@ -530,6 +573,8 @@ public static AdaptySDK.Adapty.SetLogLevel(AdaptySDK.AdaptyLogLevel level, Syste public static AdaptySDK.Adapty.SetObserverModeResolver(AdaptySDK.IAdaptyUIObserverModeResolver resolver) : System.Void public static AdaptySDK.Adapty.SetOnboardingsEventsListener(AdaptySDK.IAdaptyOnboardingsEventsListener listener) : System.Void public static AdaptySDK.Adapty.SetSystemRequestsHandler(AdaptySDK.IAdaptyUISystemRequestsHandler handler) : System.Void +public static AdaptySDK.Adapty.ShowStoreMessages(System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.ShowStoreMessages(System.Collections.Generic.IReadOnlyList iosFilter, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateAppStoreCollectingRefundDataConsent(System.Boolean consent, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateAppStoreRefundPreference(AdaptySDK.AdaptyRefundPreference refundPreference, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateExternalAttribution(System.Collections.Generic.IReadOnlyDictionary attribution, AdaptySDK.AdaptyExternalAttributionProvider provider, System.Action completionHandler) : System.Void @@ -545,11 +590,17 @@ public static AdaptySDK.AdaptyCustomAsset.LocalVideoFile(System.String path) : A public static AdaptySDK.AdaptyExternalAttributionProvider.op_Equality(AdaptySDK.AdaptyExternalAttributionProvider a, AdaptySDK.AdaptyExternalAttributionProvider b) : System.Boolean public static AdaptySDK.AdaptyExternalAttributionProvider.op_Inequality(AdaptySDK.AdaptyExternalAttributionProvider a, AdaptySDK.AdaptyExternalAttributionProvider b) : System.Boolean public static AdaptySDK.AdaptyPlacementFetchPolicy.ReturnCacheDataIfNotExpiredElseLoad(System.TimeSpan maxAge) : AdaptySDK.AdaptyPlacementFetchPolicy +public static AdaptySDK.AdaptyStoreMessageType.op_Equality(AdaptySDK.AdaptyStoreMessageType a, AdaptySDK.AdaptyStoreMessageType b) : System.Boolean +public static AdaptySDK.AdaptyStoreMessageType.op_Inequality(AdaptySDK.AdaptyStoreMessageType a, AdaptySDK.AdaptyStoreMessageType b) : System.Boolean +public static AdaptySDK.AdaptySubscriptionBillingPlan.op_Equality(AdaptySDK.AdaptySubscriptionBillingPlan a, AdaptySDK.AdaptySubscriptionBillingPlan b) : System.Boolean +public static AdaptySDK.AdaptySubscriptionBillingPlan.op_Inequality(AdaptySDK.AdaptySubscriptionBillingPlan a, AdaptySDK.AdaptySubscriptionBillingPlan b) : System.Boolean public static AdaptySDK.AdaptyUI.CreateFlowView(AdaptySDK.AdaptyFlow flow, AdaptySDK.AdaptyUICreateFlowViewParameters optionalParameters, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateFlowView(AdaptySDK.AdaptyFlow flow, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateOnboardingView(AdaptySDK.AdaptyOnboarding onboarding, AdaptySDK.AdaptyWebPresentation externalUrlsPresentation, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateOnboardingView(AdaptySDK.AdaptyOnboarding onboarding, System.Action completionHandler) : System.Void +public static AdaptySDK.AdaptyUI.DestroyFlowView(AdaptySDK.AdaptyUIFlowView view, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.DismissFlowView(AdaptySDK.AdaptyUIFlowView view, System.Action completionHandler) : System.Void +public static AdaptySDK.AdaptyUI.DismissFlowView(AdaptySDK.AdaptyUIFlowView view, System.Boolean destroy, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.DismissOnboardingView(AdaptySDK.AdaptyUIOnboardingView view, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.OpenUrl(System.String url, AdaptySDK.AdaptyWebPresentation openIn, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.PresentFlowView(AdaptySDK.AdaptyUIFlowView view, AdaptySDK.AdaptyUIIOSPresentationStyle iosPresentationStyle, System.Action completionHandler) : System.Void @@ -567,6 +618,7 @@ public static const AdaptySDK.AdaptyErrorCode.AnalyticsDisabled : AdaptySDK.Adap public static const AdaptySDK.AdaptyErrorCode.BadRequest : AdaptySDK.AdaptyErrorCode = 2003 public static const AdaptySDK.AdaptyErrorCode.BillingError : AdaptySDK.AdaptyErrorCode = 106 public static const AdaptySDK.AdaptyErrorCode.BillingNetworkError : AdaptySDK.AdaptyErrorCode = 112 +public static const AdaptySDK.AdaptyErrorCode.BillingPlanUnavailable : AdaptySDK.AdaptyErrorCode = 1060 public static const AdaptySDK.AdaptyErrorCode.BillingServiceDisconnected : AdaptySDK.AdaptyErrorCode = 99 public static const AdaptySDK.AdaptyErrorCode.BillingServiceTimeout : AdaptySDK.AdaptyErrorCode = 97 public static const AdaptySDK.AdaptyErrorCode.BillingServiceUnavailable : AdaptySDK.AdaptyErrorCode = 102 @@ -597,6 +649,7 @@ public static const AdaptySDK.AdaptyErrorCode.NetworkFailed : AdaptySDK.AdaptyEr public static const AdaptySDK.AdaptyErrorCode.NoProductIDsFound : AdaptySDK.AdaptyErrorCode = 1000 public static const AdaptySDK.AdaptyErrorCode.NoPurchasesToRestore : AdaptySDK.AdaptyErrorCode = 1004 public static const AdaptySDK.AdaptyErrorCode.NotActivated : AdaptySDK.AdaptyErrorCode = 2002 +public static const AdaptySDK.AdaptyErrorCode.OperationInProgress : AdaptySDK.AdaptyErrorCode = 3201 public static const AdaptySDK.AdaptyErrorCode.OperationInterrupted : AdaptySDK.AdaptyErrorCode = 9000 public static const AdaptySDK.AdaptyErrorCode.PaymentCancelled : AdaptySDK.AdaptyErrorCode = 2 public static const AdaptySDK.AdaptyErrorCode.PaymentInvalid : AdaptySDK.AdaptyErrorCode = 3 @@ -608,6 +661,7 @@ public static const AdaptySDK.AdaptyErrorCode.ProductPurchaseFailed : AdaptySDK. public static const AdaptySDK.AdaptyErrorCode.ProductRequestFailed : AdaptySDK.AdaptyErrorCode = 1002 public static const AdaptySDK.AdaptyErrorCode.ProfileWasChanged : AdaptySDK.AdaptyErrorCode = 3006 public static const AdaptySDK.AdaptyErrorCode.RefreshReceiptFailed : AdaptySDK.AdaptyErrorCode = 1010 +public static const AdaptySDK.AdaptyErrorCode.ResolverFailure : AdaptySDK.AdaptyErrorCode = 3202 public static const AdaptySDK.AdaptyErrorCode.ServerError : AdaptySDK.AdaptyErrorCode = 2004 public static const AdaptySDK.AdaptyErrorCode.StoreProductNotAvailable : AdaptySDK.AdaptyErrorCode = 5 public static const AdaptySDK.AdaptyErrorCode.UnauthorizedRequestData : AdaptySDK.AdaptyErrorCode = 10 @@ -640,6 +694,8 @@ public static const AdaptySDK.AdaptyRefundPreference.NoPreference : AdaptySDK.Ad public static const AdaptySDK.AdaptyServerCluster.CN : AdaptySDK.AdaptyServerCluster = 2 public static const AdaptySDK.AdaptyServerCluster.Default : AdaptySDK.AdaptyServerCluster = 0 public static const AdaptySDK.AdaptyServerCluster.EU : AdaptySDK.AdaptyServerCluster = 1 +public static const AdaptySDK.AdaptyStoreMessagesHandling.Auto : AdaptySDK.AdaptyStoreMessagesHandling = 0 +public static const AdaptySDK.AdaptyStoreMessagesHandling.Manual : AdaptySDK.AdaptyStoreMessagesHandling = 1 public static const AdaptySDK.AdaptySubscriptionOfferType.Code : AdaptySDK.AdaptySubscriptionOfferType = 3 public static const AdaptySDK.AdaptySubscriptionOfferType.Introductory : AdaptySDK.AdaptySubscriptionOfferType = 0 public static const AdaptySDK.AdaptySubscriptionOfferType.Promotional : AdaptySDK.AdaptySubscriptionOfferType = 1 @@ -680,4 +736,12 @@ public static readonly AdaptySDK.AdaptyExternalAttributionProvider.Tenjin : Adap public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.Default : AdaptySDK.AdaptyPlacementFetchPolicy public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.ReloadRevalidatingCacheData : AdaptySDK.AdaptyPlacementFetchPolicy public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.ReturnCacheDataElseLoad : AdaptySDK.AdaptyPlacementFetchPolicy -public virtual AdaptySDK.AdaptyExternalAttributionProvider.Equals(AdaptySDK.AdaptyExternalAttributionProvider other) : System.Boolean \ No newline at end of file +public static readonly AdaptySDK.AdaptyStoreMessageType.BillingIssue : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.Generic : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.PriceIncreaseConsent : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.WinBackOffer : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptySubscriptionBillingPlan.Monthly : AdaptySDK.AdaptySubscriptionBillingPlan +public static readonly AdaptySDK.AdaptySubscriptionBillingPlan.UpFront : AdaptySDK.AdaptySubscriptionBillingPlan +public virtual AdaptySDK.AdaptyExternalAttributionProvider.Equals(AdaptySDK.AdaptyExternalAttributionProvider other) : System.Boolean +public virtual AdaptySDK.AdaptyStoreMessageType.Equals(AdaptySDK.AdaptyStoreMessageType other) : System.Boolean +public virtual AdaptySDK.AdaptySubscriptionBillingPlan.Equals(AdaptySDK.AdaptySubscriptionBillingPlan other) : System.Boolean \ No newline at end of file diff --git a/tests/shared/Fixtures/approved/public-surface.editor.approved.txt b/tests/shared/Fixtures/approved/public-surface.editor.approved.txt index 8f103239..a440fdfc 100644 --- a/tests/shared/Fixtures/approved/public-surface.editor.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.editor.approved.txt @@ -35,6 +35,8 @@ public AdaptySDK.AdaptyConfiguration+Builder.SetGoogleLocalAccessLevelAllowed(Sy public AdaptySDK.AdaptyConfiguration+Builder.SetIPAddressCollectionDisabled(System.Boolean ipAddressCollectionDisabled) : AdaptySDK.Builder public AdaptySDK.AdaptyConfiguration+Builder.SetObserverMode(System.Boolean observerMode) : AdaptySDK.Builder public AdaptySDK.AdaptyConfiguration+Builder.SetServerCluster(AdaptySDK.AdaptyServerCluster serverCluster) : AdaptySDK.Builder +public AdaptySDK.AdaptyConfiguration+Builder.SetStoreMessagesHandling(AdaptySDK.AdaptyStoreMessagesHandling storeMessagesHandling) : AdaptySDK.Builder +public AdaptySDK.AdaptyConfiguration+Builder.StoreMessagesHandling : System.Nullable public AdaptySDK.AdaptyConfiguration+Builder.ctor(System.String apiKey) public AdaptySDK.AdaptyCustomAssetColor.ColorValue : UnityEngine.Color { get; } public AdaptySDK.AdaptyCustomAssetLinearGradient.Gradient : UnityEngine.Gradient { get; } @@ -76,6 +78,8 @@ public AdaptySDK.AdaptyOnboardingsSelectParams.ctor(System.String id, System.Str public AdaptySDK.AdaptyOnboardingsTextInput.ctor(System.String value) public AdaptySDK.AdaptyPaymentMode.value__ : System.Int32 public AdaptySDK.AdaptyProductIdentifier.ctor(System.String vendorProductId, System.String adaptyProductId, System.String basePlanId) +public AdaptySDK.AdaptyProfile+AccessLevel.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } +public AdaptySDK.AdaptyProfile+Subscription.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } public AdaptySDK.AdaptyProfile.AccessLevels : System.Collections.Generic.IReadOnlyDictionary { get; } public AdaptySDK.AdaptyProfile.AppliedExternalAttributionProviders : System.Collections.Generic.IReadOnlyList { get; } public AdaptySDK.AdaptyProfile.CustomAttributes : System.Collections.Generic.IReadOnlyDictionary { get; } @@ -117,8 +121,12 @@ public AdaptySDK.AdaptyPurchaseResultType.value__ : System.Int32 public AdaptySDK.AdaptyRefundPreference.value__ : System.Int32 public AdaptySDK.AdaptyRemoteConfig.Dictionary : System.Collections.Generic.IReadOnlyDictionary { get; } public AdaptySDK.AdaptyServerCluster.value__ : System.Int32 +public AdaptySDK.AdaptyStoreMessageType.ctor(System.String rawValue) +public AdaptySDK.AdaptyStoreMessagesHandling.value__ : System.Int32 +public AdaptySDK.AdaptySubscriptionBillingPlan.ctor(System.String rawValue) public AdaptySDK.AdaptySubscriptionOfferType.value__ : System.Int32 public AdaptySDK.AdaptySubscriptionPeriodUnit.value__ : System.Int32 +public AdaptySDK.AdaptySubscriptionPricingTerms.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } public AdaptySDK.AdaptySubscriptionRenewalType.value__ : System.Int32 public AdaptySDK.AdaptySubscriptionUpdateParameters.OldSubVendorProductId : System.String public AdaptySDK.AdaptySubscriptionUpdateParameters.ReplacementMode : AdaptySDK.AdaptySubscriptionUpdateReplacementMode @@ -153,7 +161,9 @@ public AdaptySDK.AdaptyUIDialogConfiguration.SetSecondaryActionTitle(System.Stri public AdaptySDK.AdaptyUIDialogConfiguration.SetTitle(System.String title) : AdaptySDK.AdaptyUIDialogConfiguration public AdaptySDK.AdaptyUIDialogConfiguration.Title : System.String public AdaptySDK.AdaptyUIDialogConfiguration.ctor() +public AdaptySDK.AdaptyUIFlowView.Destroy(System.Action completionHandler) : System.Void public AdaptySDK.AdaptyUIFlowView.Dismiss(System.Action completionHandler) : System.Void +public AdaptySDK.AdaptyUIFlowView.Dismiss(System.Boolean destroy, System.Action completionHandler) : System.Void public AdaptySDK.AdaptyUIFlowView.Id : System.String public AdaptySDK.AdaptyUIFlowView.Locale : System.String public AdaptySDK.AdaptyUIFlowView.PlacementId : System.String @@ -218,6 +228,7 @@ public enum AdaptySDK.AdaptyProfileGender : System.IComparable, System.IConverti public enum AdaptySDK.AdaptyPurchaseResultType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptyRefundPreference : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptyServerCluster : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable +public enum AdaptySDK.AdaptyStoreMessagesHandling : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionOfferType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionPeriodUnit : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionRenewalType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable @@ -257,15 +268,24 @@ public override AdaptySDK.AdaptyProductIdentifier.ToString() : System.String public override AdaptySDK.AdaptyProfile+AccessLevel.ToString() : System.String public override AdaptySDK.AdaptyProfile+NonSubscription.ToString() : System.String public override AdaptySDK.AdaptyProfile+Subscription.ToString() : System.String +public override AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.ToString() : System.String public override AdaptySDK.AdaptyProfile.ToString() : System.String public override AdaptySDK.AdaptyProfileParameters.ToString() : System.String public override AdaptySDK.AdaptyPromotedProduct.ToString() : System.String public override AdaptySDK.AdaptyPurchaseParameters.ToString() : System.String public override AdaptySDK.AdaptyPurchaseResult.ToString() : System.String +public override AdaptySDK.AdaptyStoreMessageType.Equals(System.Object obj) : System.Boolean +public override AdaptySDK.AdaptyStoreMessageType.GetHashCode() : System.Int32 +public override AdaptySDK.AdaptyStoreMessageType.ToString() : System.String public override AdaptySDK.AdaptySubscription.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionBillingPlan.Equals(System.Object obj) : System.Boolean +public override AdaptySDK.AdaptySubscriptionBillingPlan.GetHashCode() : System.Int32 +public override AdaptySDK.AdaptySubscriptionBillingPlan.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionCommitmentInfo.ToString() : System.String public override AdaptySDK.AdaptySubscriptionOffer.ToString() : System.String public override AdaptySDK.AdaptySubscriptionPeriod.ToString() : System.String public override AdaptySDK.AdaptySubscriptionPhase.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionPricingTerms.ToString() : System.String public override AdaptySDK.AdaptySubscriptionUpdateParameters.ToString() : System.String public override AdaptySDK.AdaptyUICreateFlowViewParameters.ToString() : System.String public override AdaptySDK.AdaptyUIDialogConfiguration.ToString() : System.String @@ -284,6 +304,7 @@ public readonly AdaptySDK.AdaptyFlow.InstanceIdentity : System.String public readonly AdaptySDK.AdaptyFlow.Name : System.String public readonly AdaptySDK.AdaptyFlow.Placement : AdaptySDK.AdaptyPlacement public readonly AdaptySDK.AdaptyFlow.VariationId : System.String +public readonly AdaptySDK.AdaptyFlow.VariationName : System.String public readonly AdaptySDK.AdaptyFlowPaywall.InstanceIdentity : System.String public readonly AdaptySDK.AdaptyFlowPaywall.Name : System.String public readonly AdaptySDK.AdaptyFlowPaywall.Placement : AdaptySDK.AdaptyPlacement @@ -345,6 +366,7 @@ public readonly AdaptySDK.AdaptyProfile+AccessLevel.ActivePromotionalOfferId : S public readonly AdaptySDK.AdaptyProfile+AccessLevel.ActivePromotionalOfferType : System.String public readonly AdaptySDK.AdaptyProfile+AccessLevel.BillingIssueDetectedAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+AccessLevel.CancellationReason : System.String +public readonly AdaptySDK.AdaptyProfile+AccessLevel.CommitmentInfo : AdaptySDK.SubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyProfile+AccessLevel.ExpiresAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+AccessLevel.Id : System.String public readonly AdaptySDK.AdaptyProfile+AccessLevel.IsActive : System.Boolean @@ -372,6 +394,7 @@ public readonly AdaptySDK.AdaptyProfile+Subscription.ActivePromotionalOfferId : public readonly AdaptySDK.AdaptyProfile+Subscription.ActivePromotionalOfferType : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.BillingIssueDetectedAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+Subscription.CancellationReason : System.String +public readonly AdaptySDK.AdaptyProfile+Subscription.CommitmentInfo : AdaptySDK.SubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyProfile+Subscription.ExpiresAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+Subscription.IsActive : System.Boolean public readonly AdaptySDK.AdaptyProfile+Subscription.IsInGracePeriod : System.Boolean @@ -387,6 +410,9 @@ public readonly AdaptySDK.AdaptyProfile+Subscription.VendorOriginalTransactionId public readonly AdaptySDK.AdaptyProfile+Subscription.VendorProductId : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.VendorTransactionId : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.WillRenew : System.Boolean +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.BillingPeriodNumber : System.Int32 +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.ExpiresAt : System.DateTime +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.TotalBillingPeriods : System.Int32 public readonly AdaptySDK.AdaptyProfile.CustomerUserId : System.String public readonly AdaptySDK.AdaptyProfile.ProfileId : System.String public readonly AdaptySDK.AdaptyPromotedProduct.IsFamilyShareable : System.Boolean @@ -404,12 +430,17 @@ public readonly AdaptySDK.AdaptyPurchaseResult.Profile : AdaptySDK.AdaptyProfile public readonly AdaptySDK.AdaptyPurchaseResult.Type : AdaptySDK.AdaptyPurchaseResultType public readonly AdaptySDK.AdaptyRemoteConfig.Data : System.String public readonly AdaptySDK.AdaptyRemoteConfig.Locale : System.String +public readonly AdaptySDK.AdaptyStoreMessageType.RawValue : System.String public readonly AdaptySDK.AdaptySubscription.BasePlanId : System.String public readonly AdaptySDK.AdaptySubscription.GroupIdentifier : System.String public readonly AdaptySDK.AdaptySubscription.LocalizedPeriod : System.String public readonly AdaptySDK.AdaptySubscription.Offer : AdaptySDK.AdaptySubscriptionOffer public readonly AdaptySDK.AdaptySubscription.Period : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscription.PricingTerms : AdaptySDK.AdaptySubscriptionPricingTerms public readonly AdaptySDK.AdaptySubscription.RenewalType : AdaptySDK.AdaptySubscriptionRenewalType +public readonly AdaptySDK.AdaptySubscriptionBillingPlan.RawValue : System.String +public readonly AdaptySDK.AdaptySubscriptionCommitmentInfo.Period : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionCommitmentInfo.Price : AdaptySDK.AdaptyPrice public readonly AdaptySDK.AdaptySubscriptionOffer.Identifier : System.String public readonly AdaptySDK.AdaptySubscriptionOffer.OfferTags : System.Collections.Generic.IReadOnlyList public readonly AdaptySDK.AdaptySubscriptionOffer.Phases : System.Collections.Generic.IReadOnlyList @@ -422,6 +453,9 @@ public readonly AdaptySDK.AdaptySubscriptionPhase.NumberOfPeriods : System.Int32 public readonly AdaptySDK.AdaptySubscriptionPhase.PaymentMode : AdaptySDK.AdaptyPaymentMode public readonly AdaptySDK.AdaptySubscriptionPhase.Price : AdaptySDK.AdaptyPrice public readonly AdaptySDK.AdaptySubscriptionPhase.SubscriptionPeriod : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.BillingPeriod : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.BillingPrice : AdaptySDK.AdaptyPrice +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.CommitmentInfo : AdaptySDK.AdaptySubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyUIOnboardingMeta.OnboardingId : System.String public readonly AdaptySDK.AdaptyUIOnboardingMeta.ScreenClientId : System.String public readonly AdaptySDK.AdaptyUIOnboardingMeta.ScreenIndex : System.Int32 @@ -468,6 +502,7 @@ public sealed class AdaptySDK.AdaptyProfile public sealed class AdaptySDK.AdaptyProfile+AccessLevel public sealed class AdaptySDK.AdaptyProfile+NonSubscription public sealed class AdaptySDK.AdaptyProfile+Subscription +public sealed class AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo public sealed class AdaptySDK.AdaptyProfileParameters public sealed class AdaptySDK.AdaptyProfileParameters+Builder public sealed class AdaptySDK.AdaptyPromotedProduct @@ -475,10 +510,14 @@ public sealed class AdaptySDK.AdaptyPurchaseParameters public sealed class AdaptySDK.AdaptyPurchaseParametersBuilder public sealed class AdaptySDK.AdaptyPurchaseResult public sealed class AdaptySDK.AdaptyRemoteConfig +public sealed class AdaptySDK.AdaptyStoreMessageType : System.IEquatable public sealed class AdaptySDK.AdaptySubscription +public sealed class AdaptySDK.AdaptySubscriptionBillingPlan : System.IEquatable +public sealed class AdaptySDK.AdaptySubscriptionCommitmentInfo public sealed class AdaptySDK.AdaptySubscriptionOffer public sealed class AdaptySDK.AdaptySubscriptionPeriod public sealed class AdaptySDK.AdaptySubscriptionPhase +public sealed class AdaptySDK.AdaptySubscriptionPricingTerms public sealed class AdaptySDK.AdaptySubscriptionUpdateParameters public sealed class AdaptySDK.AdaptyUICreateFlowViewParameters public sealed class AdaptySDK.AdaptyUIDialogConfiguration @@ -505,6 +544,7 @@ public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String pla public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String placementId, System.String locale, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String placementId, System.String locale, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetPaywallProducts(AdaptySDK.AdaptyFlow flow, System.Action, AdaptySDK.AdaptyError> completionHandler) : System.Void +public static AdaptySDK.Adapty.GetPendingStoreMessageTypes(System.Action, AdaptySDK.AdaptyError> completionHandler) : System.Void public static AdaptySDK.Adapty.GetProfile(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.Identify(System.String customerUserId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.Identify(System.String customerUserId, System.Guid iosAppAccountToken, System.String androidObfuscatedAccountId, System.Action completionHandler) : System.Void @@ -518,6 +558,9 @@ public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyFlowPaywall paywal public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyFlowPaywall paywall, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyPaywallProduct product, AdaptySDK.AdaptyWebPresentation openIn, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyPaywallProduct product, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlows(System.Collections.Generic.IReadOnlyList placementIds, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlows(System.Collections.Generic.IReadOnlyList placementIds, System.Nullable loadTimeout, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlowsForDefaultAudience(System.Collections.Generic.IReadOnlyList placementIds, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.PresentCodeRedemptionSheet(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.Action completionHandler) : System.Void @@ -530,6 +573,8 @@ public static AdaptySDK.Adapty.SetLogLevel(AdaptySDK.AdaptyLogLevel level, Syste public static AdaptySDK.Adapty.SetObserverModeResolver(AdaptySDK.IAdaptyUIObserverModeResolver resolver) : System.Void public static AdaptySDK.Adapty.SetOnboardingsEventsListener(AdaptySDK.IAdaptyOnboardingsEventsListener listener) : System.Void public static AdaptySDK.Adapty.SetSystemRequestsHandler(AdaptySDK.IAdaptyUISystemRequestsHandler handler) : System.Void +public static AdaptySDK.Adapty.ShowStoreMessages(System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.ShowStoreMessages(System.Collections.Generic.IReadOnlyList iosFilter, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateAppStoreCollectingRefundDataConsent(System.Boolean consent, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateAppStoreRefundPreference(AdaptySDK.AdaptyRefundPreference refundPreference, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateExternalAttribution(System.Collections.Generic.IReadOnlyDictionary attribution, AdaptySDK.AdaptyExternalAttributionProvider provider, System.Action completionHandler) : System.Void @@ -545,11 +590,17 @@ public static AdaptySDK.AdaptyCustomAsset.LocalVideoFile(System.String path) : A public static AdaptySDK.AdaptyExternalAttributionProvider.op_Equality(AdaptySDK.AdaptyExternalAttributionProvider a, AdaptySDK.AdaptyExternalAttributionProvider b) : System.Boolean public static AdaptySDK.AdaptyExternalAttributionProvider.op_Inequality(AdaptySDK.AdaptyExternalAttributionProvider a, AdaptySDK.AdaptyExternalAttributionProvider b) : System.Boolean public static AdaptySDK.AdaptyPlacementFetchPolicy.ReturnCacheDataIfNotExpiredElseLoad(System.TimeSpan maxAge) : AdaptySDK.AdaptyPlacementFetchPolicy +public static AdaptySDK.AdaptyStoreMessageType.op_Equality(AdaptySDK.AdaptyStoreMessageType a, AdaptySDK.AdaptyStoreMessageType b) : System.Boolean +public static AdaptySDK.AdaptyStoreMessageType.op_Inequality(AdaptySDK.AdaptyStoreMessageType a, AdaptySDK.AdaptyStoreMessageType b) : System.Boolean +public static AdaptySDK.AdaptySubscriptionBillingPlan.op_Equality(AdaptySDK.AdaptySubscriptionBillingPlan a, AdaptySDK.AdaptySubscriptionBillingPlan b) : System.Boolean +public static AdaptySDK.AdaptySubscriptionBillingPlan.op_Inequality(AdaptySDK.AdaptySubscriptionBillingPlan a, AdaptySDK.AdaptySubscriptionBillingPlan b) : System.Boolean public static AdaptySDK.AdaptyUI.CreateFlowView(AdaptySDK.AdaptyFlow flow, AdaptySDK.AdaptyUICreateFlowViewParameters optionalParameters, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateFlowView(AdaptySDK.AdaptyFlow flow, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateOnboardingView(AdaptySDK.AdaptyOnboarding onboarding, AdaptySDK.AdaptyWebPresentation externalUrlsPresentation, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateOnboardingView(AdaptySDK.AdaptyOnboarding onboarding, System.Action completionHandler) : System.Void +public static AdaptySDK.AdaptyUI.DestroyFlowView(AdaptySDK.AdaptyUIFlowView view, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.DismissFlowView(AdaptySDK.AdaptyUIFlowView view, System.Action completionHandler) : System.Void +public static AdaptySDK.AdaptyUI.DismissFlowView(AdaptySDK.AdaptyUIFlowView view, System.Boolean destroy, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.DismissOnboardingView(AdaptySDK.AdaptyUIOnboardingView view, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.OpenUrl(System.String url, AdaptySDK.AdaptyWebPresentation openIn, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.PresentFlowView(AdaptySDK.AdaptyUIFlowView view, AdaptySDK.AdaptyUIIOSPresentationStyle iosPresentationStyle, System.Action completionHandler) : System.Void @@ -567,6 +618,7 @@ public static const AdaptySDK.AdaptyErrorCode.AnalyticsDisabled : AdaptySDK.Adap public static const AdaptySDK.AdaptyErrorCode.BadRequest : AdaptySDK.AdaptyErrorCode = 2003 public static const AdaptySDK.AdaptyErrorCode.BillingError : AdaptySDK.AdaptyErrorCode = 106 public static const AdaptySDK.AdaptyErrorCode.BillingNetworkError : AdaptySDK.AdaptyErrorCode = 112 +public static const AdaptySDK.AdaptyErrorCode.BillingPlanUnavailable : AdaptySDK.AdaptyErrorCode = 1060 public static const AdaptySDK.AdaptyErrorCode.BillingServiceDisconnected : AdaptySDK.AdaptyErrorCode = 99 public static const AdaptySDK.AdaptyErrorCode.BillingServiceTimeout : AdaptySDK.AdaptyErrorCode = 97 public static const AdaptySDK.AdaptyErrorCode.BillingServiceUnavailable : AdaptySDK.AdaptyErrorCode = 102 @@ -597,6 +649,7 @@ public static const AdaptySDK.AdaptyErrorCode.NetworkFailed : AdaptySDK.AdaptyEr public static const AdaptySDK.AdaptyErrorCode.NoProductIDsFound : AdaptySDK.AdaptyErrorCode = 1000 public static const AdaptySDK.AdaptyErrorCode.NoPurchasesToRestore : AdaptySDK.AdaptyErrorCode = 1004 public static const AdaptySDK.AdaptyErrorCode.NotActivated : AdaptySDK.AdaptyErrorCode = 2002 +public static const AdaptySDK.AdaptyErrorCode.OperationInProgress : AdaptySDK.AdaptyErrorCode = 3201 public static const AdaptySDK.AdaptyErrorCode.OperationInterrupted : AdaptySDK.AdaptyErrorCode = 9000 public static const AdaptySDK.AdaptyErrorCode.PaymentCancelled : AdaptySDK.AdaptyErrorCode = 2 public static const AdaptySDK.AdaptyErrorCode.PaymentInvalid : AdaptySDK.AdaptyErrorCode = 3 @@ -608,6 +661,7 @@ public static const AdaptySDK.AdaptyErrorCode.ProductPurchaseFailed : AdaptySDK. public static const AdaptySDK.AdaptyErrorCode.ProductRequestFailed : AdaptySDK.AdaptyErrorCode = 1002 public static const AdaptySDK.AdaptyErrorCode.ProfileWasChanged : AdaptySDK.AdaptyErrorCode = 3006 public static const AdaptySDK.AdaptyErrorCode.RefreshReceiptFailed : AdaptySDK.AdaptyErrorCode = 1010 +public static const AdaptySDK.AdaptyErrorCode.ResolverFailure : AdaptySDK.AdaptyErrorCode = 3202 public static const AdaptySDK.AdaptyErrorCode.ServerError : AdaptySDK.AdaptyErrorCode = 2004 public static const AdaptySDK.AdaptyErrorCode.StoreProductNotAvailable : AdaptySDK.AdaptyErrorCode = 5 public static const AdaptySDK.AdaptyErrorCode.UnauthorizedRequestData : AdaptySDK.AdaptyErrorCode = 10 @@ -640,6 +694,8 @@ public static const AdaptySDK.AdaptyRefundPreference.NoPreference : AdaptySDK.Ad public static const AdaptySDK.AdaptyServerCluster.CN : AdaptySDK.AdaptyServerCluster = 2 public static const AdaptySDK.AdaptyServerCluster.Default : AdaptySDK.AdaptyServerCluster = 0 public static const AdaptySDK.AdaptyServerCluster.EU : AdaptySDK.AdaptyServerCluster = 1 +public static const AdaptySDK.AdaptyStoreMessagesHandling.Auto : AdaptySDK.AdaptyStoreMessagesHandling = 0 +public static const AdaptySDK.AdaptyStoreMessagesHandling.Manual : AdaptySDK.AdaptyStoreMessagesHandling = 1 public static const AdaptySDK.AdaptySubscriptionOfferType.Code : AdaptySDK.AdaptySubscriptionOfferType = 3 public static const AdaptySDK.AdaptySubscriptionOfferType.Introductory : AdaptySDK.AdaptySubscriptionOfferType = 0 public static const AdaptySDK.AdaptySubscriptionOfferType.Promotional : AdaptySDK.AdaptySubscriptionOfferType = 1 @@ -680,4 +736,12 @@ public static readonly AdaptySDK.AdaptyExternalAttributionProvider.Tenjin : Adap public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.Default : AdaptySDK.AdaptyPlacementFetchPolicy public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.ReloadRevalidatingCacheData : AdaptySDK.AdaptyPlacementFetchPolicy public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.ReturnCacheDataElseLoad : AdaptySDK.AdaptyPlacementFetchPolicy -public virtual AdaptySDK.AdaptyExternalAttributionProvider.Equals(AdaptySDK.AdaptyExternalAttributionProvider other) : System.Boolean \ No newline at end of file +public static readonly AdaptySDK.AdaptyStoreMessageType.BillingIssue : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.Generic : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.PriceIncreaseConsent : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.WinBackOffer : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptySubscriptionBillingPlan.Monthly : AdaptySDK.AdaptySubscriptionBillingPlan +public static readonly AdaptySDK.AdaptySubscriptionBillingPlan.UpFront : AdaptySDK.AdaptySubscriptionBillingPlan +public virtual AdaptySDK.AdaptyExternalAttributionProvider.Equals(AdaptySDK.AdaptyExternalAttributionProvider other) : System.Boolean +public virtual AdaptySDK.AdaptyStoreMessageType.Equals(AdaptySDK.AdaptyStoreMessageType other) : System.Boolean +public virtual AdaptySDK.AdaptySubscriptionBillingPlan.Equals(AdaptySDK.AdaptySubscriptionBillingPlan other) : System.Boolean \ No newline at end of file diff --git a/tests/shared/Fixtures/approved/public-surface.ios.approved.txt b/tests/shared/Fixtures/approved/public-surface.ios.approved.txt index 8f103239..a440fdfc 100644 --- a/tests/shared/Fixtures/approved/public-surface.ios.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.ios.approved.txt @@ -35,6 +35,8 @@ public AdaptySDK.AdaptyConfiguration+Builder.SetGoogleLocalAccessLevelAllowed(Sy public AdaptySDK.AdaptyConfiguration+Builder.SetIPAddressCollectionDisabled(System.Boolean ipAddressCollectionDisabled) : AdaptySDK.Builder public AdaptySDK.AdaptyConfiguration+Builder.SetObserverMode(System.Boolean observerMode) : AdaptySDK.Builder public AdaptySDK.AdaptyConfiguration+Builder.SetServerCluster(AdaptySDK.AdaptyServerCluster serverCluster) : AdaptySDK.Builder +public AdaptySDK.AdaptyConfiguration+Builder.SetStoreMessagesHandling(AdaptySDK.AdaptyStoreMessagesHandling storeMessagesHandling) : AdaptySDK.Builder +public AdaptySDK.AdaptyConfiguration+Builder.StoreMessagesHandling : System.Nullable public AdaptySDK.AdaptyConfiguration+Builder.ctor(System.String apiKey) public AdaptySDK.AdaptyCustomAssetColor.ColorValue : UnityEngine.Color { get; } public AdaptySDK.AdaptyCustomAssetLinearGradient.Gradient : UnityEngine.Gradient { get; } @@ -76,6 +78,8 @@ public AdaptySDK.AdaptyOnboardingsSelectParams.ctor(System.String id, System.Str public AdaptySDK.AdaptyOnboardingsTextInput.ctor(System.String value) public AdaptySDK.AdaptyPaymentMode.value__ : System.Int32 public AdaptySDK.AdaptyProductIdentifier.ctor(System.String vendorProductId, System.String adaptyProductId, System.String basePlanId) +public AdaptySDK.AdaptyProfile+AccessLevel.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } +public AdaptySDK.AdaptyProfile+Subscription.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } public AdaptySDK.AdaptyProfile.AccessLevels : System.Collections.Generic.IReadOnlyDictionary { get; } public AdaptySDK.AdaptyProfile.AppliedExternalAttributionProviders : System.Collections.Generic.IReadOnlyList { get; } public AdaptySDK.AdaptyProfile.CustomAttributes : System.Collections.Generic.IReadOnlyDictionary { get; } @@ -117,8 +121,12 @@ public AdaptySDK.AdaptyPurchaseResultType.value__ : System.Int32 public AdaptySDK.AdaptyRefundPreference.value__ : System.Int32 public AdaptySDK.AdaptyRemoteConfig.Dictionary : System.Collections.Generic.IReadOnlyDictionary { get; } public AdaptySDK.AdaptyServerCluster.value__ : System.Int32 +public AdaptySDK.AdaptyStoreMessageType.ctor(System.String rawValue) +public AdaptySDK.AdaptyStoreMessagesHandling.value__ : System.Int32 +public AdaptySDK.AdaptySubscriptionBillingPlan.ctor(System.String rawValue) public AdaptySDK.AdaptySubscriptionOfferType.value__ : System.Int32 public AdaptySDK.AdaptySubscriptionPeriodUnit.value__ : System.Int32 +public AdaptySDK.AdaptySubscriptionPricingTerms.BillingPlan : AdaptySDK.AdaptySubscriptionBillingPlan { get; } public AdaptySDK.AdaptySubscriptionRenewalType.value__ : System.Int32 public AdaptySDK.AdaptySubscriptionUpdateParameters.OldSubVendorProductId : System.String public AdaptySDK.AdaptySubscriptionUpdateParameters.ReplacementMode : AdaptySDK.AdaptySubscriptionUpdateReplacementMode @@ -153,7 +161,9 @@ public AdaptySDK.AdaptyUIDialogConfiguration.SetSecondaryActionTitle(System.Stri public AdaptySDK.AdaptyUIDialogConfiguration.SetTitle(System.String title) : AdaptySDK.AdaptyUIDialogConfiguration public AdaptySDK.AdaptyUIDialogConfiguration.Title : System.String public AdaptySDK.AdaptyUIDialogConfiguration.ctor() +public AdaptySDK.AdaptyUIFlowView.Destroy(System.Action completionHandler) : System.Void public AdaptySDK.AdaptyUIFlowView.Dismiss(System.Action completionHandler) : System.Void +public AdaptySDK.AdaptyUIFlowView.Dismiss(System.Boolean destroy, System.Action completionHandler) : System.Void public AdaptySDK.AdaptyUIFlowView.Id : System.String public AdaptySDK.AdaptyUIFlowView.Locale : System.String public AdaptySDK.AdaptyUIFlowView.PlacementId : System.String @@ -218,6 +228,7 @@ public enum AdaptySDK.AdaptyProfileGender : System.IComparable, System.IConverti public enum AdaptySDK.AdaptyPurchaseResultType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptyRefundPreference : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptyServerCluster : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable +public enum AdaptySDK.AdaptyStoreMessagesHandling : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionOfferType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionPeriodUnit : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable public enum AdaptySDK.AdaptySubscriptionRenewalType : System.IComparable, System.IConvertible, System.IFormattable, System.ISpanFormattable @@ -257,15 +268,24 @@ public override AdaptySDK.AdaptyProductIdentifier.ToString() : System.String public override AdaptySDK.AdaptyProfile+AccessLevel.ToString() : System.String public override AdaptySDK.AdaptyProfile+NonSubscription.ToString() : System.String public override AdaptySDK.AdaptyProfile+Subscription.ToString() : System.String +public override AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.ToString() : System.String public override AdaptySDK.AdaptyProfile.ToString() : System.String public override AdaptySDK.AdaptyProfileParameters.ToString() : System.String public override AdaptySDK.AdaptyPromotedProduct.ToString() : System.String public override AdaptySDK.AdaptyPurchaseParameters.ToString() : System.String public override AdaptySDK.AdaptyPurchaseResult.ToString() : System.String +public override AdaptySDK.AdaptyStoreMessageType.Equals(System.Object obj) : System.Boolean +public override AdaptySDK.AdaptyStoreMessageType.GetHashCode() : System.Int32 +public override AdaptySDK.AdaptyStoreMessageType.ToString() : System.String public override AdaptySDK.AdaptySubscription.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionBillingPlan.Equals(System.Object obj) : System.Boolean +public override AdaptySDK.AdaptySubscriptionBillingPlan.GetHashCode() : System.Int32 +public override AdaptySDK.AdaptySubscriptionBillingPlan.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionCommitmentInfo.ToString() : System.String public override AdaptySDK.AdaptySubscriptionOffer.ToString() : System.String public override AdaptySDK.AdaptySubscriptionPeriod.ToString() : System.String public override AdaptySDK.AdaptySubscriptionPhase.ToString() : System.String +public override AdaptySDK.AdaptySubscriptionPricingTerms.ToString() : System.String public override AdaptySDK.AdaptySubscriptionUpdateParameters.ToString() : System.String public override AdaptySDK.AdaptyUICreateFlowViewParameters.ToString() : System.String public override AdaptySDK.AdaptyUIDialogConfiguration.ToString() : System.String @@ -284,6 +304,7 @@ public readonly AdaptySDK.AdaptyFlow.InstanceIdentity : System.String public readonly AdaptySDK.AdaptyFlow.Name : System.String public readonly AdaptySDK.AdaptyFlow.Placement : AdaptySDK.AdaptyPlacement public readonly AdaptySDK.AdaptyFlow.VariationId : System.String +public readonly AdaptySDK.AdaptyFlow.VariationName : System.String public readonly AdaptySDK.AdaptyFlowPaywall.InstanceIdentity : System.String public readonly AdaptySDK.AdaptyFlowPaywall.Name : System.String public readonly AdaptySDK.AdaptyFlowPaywall.Placement : AdaptySDK.AdaptyPlacement @@ -345,6 +366,7 @@ public readonly AdaptySDK.AdaptyProfile+AccessLevel.ActivePromotionalOfferId : S public readonly AdaptySDK.AdaptyProfile+AccessLevel.ActivePromotionalOfferType : System.String public readonly AdaptySDK.AdaptyProfile+AccessLevel.BillingIssueDetectedAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+AccessLevel.CancellationReason : System.String +public readonly AdaptySDK.AdaptyProfile+AccessLevel.CommitmentInfo : AdaptySDK.SubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyProfile+AccessLevel.ExpiresAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+AccessLevel.Id : System.String public readonly AdaptySDK.AdaptyProfile+AccessLevel.IsActive : System.Boolean @@ -372,6 +394,7 @@ public readonly AdaptySDK.AdaptyProfile+Subscription.ActivePromotionalOfferId : public readonly AdaptySDK.AdaptyProfile+Subscription.ActivePromotionalOfferType : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.BillingIssueDetectedAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+Subscription.CancellationReason : System.String +public readonly AdaptySDK.AdaptyProfile+Subscription.CommitmentInfo : AdaptySDK.SubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyProfile+Subscription.ExpiresAt : System.Nullable public readonly AdaptySDK.AdaptyProfile+Subscription.IsActive : System.Boolean public readonly AdaptySDK.AdaptyProfile+Subscription.IsInGracePeriod : System.Boolean @@ -387,6 +410,9 @@ public readonly AdaptySDK.AdaptyProfile+Subscription.VendorOriginalTransactionId public readonly AdaptySDK.AdaptyProfile+Subscription.VendorProductId : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.VendorTransactionId : System.String public readonly AdaptySDK.AdaptyProfile+Subscription.WillRenew : System.Boolean +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.BillingPeriodNumber : System.Int32 +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.ExpiresAt : System.DateTime +public readonly AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo.TotalBillingPeriods : System.Int32 public readonly AdaptySDK.AdaptyProfile.CustomerUserId : System.String public readonly AdaptySDK.AdaptyProfile.ProfileId : System.String public readonly AdaptySDK.AdaptyPromotedProduct.IsFamilyShareable : System.Boolean @@ -404,12 +430,17 @@ public readonly AdaptySDK.AdaptyPurchaseResult.Profile : AdaptySDK.AdaptyProfile public readonly AdaptySDK.AdaptyPurchaseResult.Type : AdaptySDK.AdaptyPurchaseResultType public readonly AdaptySDK.AdaptyRemoteConfig.Data : System.String public readonly AdaptySDK.AdaptyRemoteConfig.Locale : System.String +public readonly AdaptySDK.AdaptyStoreMessageType.RawValue : System.String public readonly AdaptySDK.AdaptySubscription.BasePlanId : System.String public readonly AdaptySDK.AdaptySubscription.GroupIdentifier : System.String public readonly AdaptySDK.AdaptySubscription.LocalizedPeriod : System.String public readonly AdaptySDK.AdaptySubscription.Offer : AdaptySDK.AdaptySubscriptionOffer public readonly AdaptySDK.AdaptySubscription.Period : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscription.PricingTerms : AdaptySDK.AdaptySubscriptionPricingTerms public readonly AdaptySDK.AdaptySubscription.RenewalType : AdaptySDK.AdaptySubscriptionRenewalType +public readonly AdaptySDK.AdaptySubscriptionBillingPlan.RawValue : System.String +public readonly AdaptySDK.AdaptySubscriptionCommitmentInfo.Period : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionCommitmentInfo.Price : AdaptySDK.AdaptyPrice public readonly AdaptySDK.AdaptySubscriptionOffer.Identifier : System.String public readonly AdaptySDK.AdaptySubscriptionOffer.OfferTags : System.Collections.Generic.IReadOnlyList public readonly AdaptySDK.AdaptySubscriptionOffer.Phases : System.Collections.Generic.IReadOnlyList @@ -422,6 +453,9 @@ public readonly AdaptySDK.AdaptySubscriptionPhase.NumberOfPeriods : System.Int32 public readonly AdaptySDK.AdaptySubscriptionPhase.PaymentMode : AdaptySDK.AdaptyPaymentMode public readonly AdaptySDK.AdaptySubscriptionPhase.Price : AdaptySDK.AdaptyPrice public readonly AdaptySDK.AdaptySubscriptionPhase.SubscriptionPeriod : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.BillingPeriod : AdaptySDK.AdaptySubscriptionPeriod +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.BillingPrice : AdaptySDK.AdaptyPrice +public readonly AdaptySDK.AdaptySubscriptionPricingTerms.CommitmentInfo : AdaptySDK.AdaptySubscriptionCommitmentInfo public readonly AdaptySDK.AdaptyUIOnboardingMeta.OnboardingId : System.String public readonly AdaptySDK.AdaptyUIOnboardingMeta.ScreenClientId : System.String public readonly AdaptySDK.AdaptyUIOnboardingMeta.ScreenIndex : System.Int32 @@ -468,6 +502,7 @@ public sealed class AdaptySDK.AdaptyProfile public sealed class AdaptySDK.AdaptyProfile+AccessLevel public sealed class AdaptySDK.AdaptyProfile+NonSubscription public sealed class AdaptySDK.AdaptyProfile+Subscription +public sealed class AdaptySDK.AdaptyProfile+SubscriptionCommitmentInfo public sealed class AdaptySDK.AdaptyProfileParameters public sealed class AdaptySDK.AdaptyProfileParameters+Builder public sealed class AdaptySDK.AdaptyPromotedProduct @@ -475,10 +510,14 @@ public sealed class AdaptySDK.AdaptyPurchaseParameters public sealed class AdaptySDK.AdaptyPurchaseParametersBuilder public sealed class AdaptySDK.AdaptyPurchaseResult public sealed class AdaptySDK.AdaptyRemoteConfig +public sealed class AdaptySDK.AdaptyStoreMessageType : System.IEquatable public sealed class AdaptySDK.AdaptySubscription +public sealed class AdaptySDK.AdaptySubscriptionBillingPlan : System.IEquatable +public sealed class AdaptySDK.AdaptySubscriptionCommitmentInfo public sealed class AdaptySDK.AdaptySubscriptionOffer public sealed class AdaptySDK.AdaptySubscriptionPeriod public sealed class AdaptySDK.AdaptySubscriptionPhase +public sealed class AdaptySDK.AdaptySubscriptionPricingTerms public sealed class AdaptySDK.AdaptySubscriptionUpdateParameters public sealed class AdaptySDK.AdaptyUICreateFlowViewParameters public sealed class AdaptySDK.AdaptyUIDialogConfiguration @@ -505,6 +544,7 @@ public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String pla public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String placementId, System.String locale, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboardingForDefaultAudience(System.String placementId, System.String locale, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetPaywallProducts(AdaptySDK.AdaptyFlow flow, System.Action, AdaptySDK.AdaptyError> completionHandler) : System.Void +public static AdaptySDK.Adapty.GetPendingStoreMessageTypes(System.Action, AdaptySDK.AdaptyError> completionHandler) : System.Void public static AdaptySDK.Adapty.GetProfile(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.Identify(System.String customerUserId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.Identify(System.String customerUserId, System.Guid iosAppAccountToken, System.String androidObfuscatedAccountId, System.Action completionHandler) : System.Void @@ -518,6 +558,9 @@ public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyFlowPaywall paywal public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyFlowPaywall paywall, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyPaywallProduct product, AdaptySDK.AdaptyWebPresentation openIn, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.OpenWebPaywall(AdaptySDK.AdaptyPaywallProduct product, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlows(System.Collections.Generic.IReadOnlyList placementIds, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlows(System.Collections.Generic.IReadOnlyList placementIds, System.Nullable loadTimeout, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.PreloadFlowsForDefaultAudience(System.Collections.Generic.IReadOnlyList placementIds, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.PresentCodeRedemptionSheet(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.Action completionHandler) : System.Void @@ -530,6 +573,8 @@ public static AdaptySDK.Adapty.SetLogLevel(AdaptySDK.AdaptyLogLevel level, Syste public static AdaptySDK.Adapty.SetObserverModeResolver(AdaptySDK.IAdaptyUIObserverModeResolver resolver) : System.Void public static AdaptySDK.Adapty.SetOnboardingsEventsListener(AdaptySDK.IAdaptyOnboardingsEventsListener listener) : System.Void public static AdaptySDK.Adapty.SetSystemRequestsHandler(AdaptySDK.IAdaptyUISystemRequestsHandler handler) : System.Void +public static AdaptySDK.Adapty.ShowStoreMessages(System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.ShowStoreMessages(System.Collections.Generic.IReadOnlyList iosFilter, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateAppStoreCollectingRefundDataConsent(System.Boolean consent, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateAppStoreRefundPreference(AdaptySDK.AdaptyRefundPreference refundPreference, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.UpdateExternalAttribution(System.Collections.Generic.IReadOnlyDictionary attribution, AdaptySDK.AdaptyExternalAttributionProvider provider, System.Action completionHandler) : System.Void @@ -545,11 +590,17 @@ public static AdaptySDK.AdaptyCustomAsset.LocalVideoFile(System.String path) : A public static AdaptySDK.AdaptyExternalAttributionProvider.op_Equality(AdaptySDK.AdaptyExternalAttributionProvider a, AdaptySDK.AdaptyExternalAttributionProvider b) : System.Boolean public static AdaptySDK.AdaptyExternalAttributionProvider.op_Inequality(AdaptySDK.AdaptyExternalAttributionProvider a, AdaptySDK.AdaptyExternalAttributionProvider b) : System.Boolean public static AdaptySDK.AdaptyPlacementFetchPolicy.ReturnCacheDataIfNotExpiredElseLoad(System.TimeSpan maxAge) : AdaptySDK.AdaptyPlacementFetchPolicy +public static AdaptySDK.AdaptyStoreMessageType.op_Equality(AdaptySDK.AdaptyStoreMessageType a, AdaptySDK.AdaptyStoreMessageType b) : System.Boolean +public static AdaptySDK.AdaptyStoreMessageType.op_Inequality(AdaptySDK.AdaptyStoreMessageType a, AdaptySDK.AdaptyStoreMessageType b) : System.Boolean +public static AdaptySDK.AdaptySubscriptionBillingPlan.op_Equality(AdaptySDK.AdaptySubscriptionBillingPlan a, AdaptySDK.AdaptySubscriptionBillingPlan b) : System.Boolean +public static AdaptySDK.AdaptySubscriptionBillingPlan.op_Inequality(AdaptySDK.AdaptySubscriptionBillingPlan a, AdaptySDK.AdaptySubscriptionBillingPlan b) : System.Boolean public static AdaptySDK.AdaptyUI.CreateFlowView(AdaptySDK.AdaptyFlow flow, AdaptySDK.AdaptyUICreateFlowViewParameters optionalParameters, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateFlowView(AdaptySDK.AdaptyFlow flow, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateOnboardingView(AdaptySDK.AdaptyOnboarding onboarding, AdaptySDK.AdaptyWebPresentation externalUrlsPresentation, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.CreateOnboardingView(AdaptySDK.AdaptyOnboarding onboarding, System.Action completionHandler) : System.Void +public static AdaptySDK.AdaptyUI.DestroyFlowView(AdaptySDK.AdaptyUIFlowView view, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.DismissFlowView(AdaptySDK.AdaptyUIFlowView view, System.Action completionHandler) : System.Void +public static AdaptySDK.AdaptyUI.DismissFlowView(AdaptySDK.AdaptyUIFlowView view, System.Boolean destroy, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.DismissOnboardingView(AdaptySDK.AdaptyUIOnboardingView view, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.OpenUrl(System.String url, AdaptySDK.AdaptyWebPresentation openIn, System.Action completionHandler) : System.Void public static AdaptySDK.AdaptyUI.PresentFlowView(AdaptySDK.AdaptyUIFlowView view, AdaptySDK.AdaptyUIIOSPresentationStyle iosPresentationStyle, System.Action completionHandler) : System.Void @@ -567,6 +618,7 @@ public static const AdaptySDK.AdaptyErrorCode.AnalyticsDisabled : AdaptySDK.Adap public static const AdaptySDK.AdaptyErrorCode.BadRequest : AdaptySDK.AdaptyErrorCode = 2003 public static const AdaptySDK.AdaptyErrorCode.BillingError : AdaptySDK.AdaptyErrorCode = 106 public static const AdaptySDK.AdaptyErrorCode.BillingNetworkError : AdaptySDK.AdaptyErrorCode = 112 +public static const AdaptySDK.AdaptyErrorCode.BillingPlanUnavailable : AdaptySDK.AdaptyErrorCode = 1060 public static const AdaptySDK.AdaptyErrorCode.BillingServiceDisconnected : AdaptySDK.AdaptyErrorCode = 99 public static const AdaptySDK.AdaptyErrorCode.BillingServiceTimeout : AdaptySDK.AdaptyErrorCode = 97 public static const AdaptySDK.AdaptyErrorCode.BillingServiceUnavailable : AdaptySDK.AdaptyErrorCode = 102 @@ -597,6 +649,7 @@ public static const AdaptySDK.AdaptyErrorCode.NetworkFailed : AdaptySDK.AdaptyEr public static const AdaptySDK.AdaptyErrorCode.NoProductIDsFound : AdaptySDK.AdaptyErrorCode = 1000 public static const AdaptySDK.AdaptyErrorCode.NoPurchasesToRestore : AdaptySDK.AdaptyErrorCode = 1004 public static const AdaptySDK.AdaptyErrorCode.NotActivated : AdaptySDK.AdaptyErrorCode = 2002 +public static const AdaptySDK.AdaptyErrorCode.OperationInProgress : AdaptySDK.AdaptyErrorCode = 3201 public static const AdaptySDK.AdaptyErrorCode.OperationInterrupted : AdaptySDK.AdaptyErrorCode = 9000 public static const AdaptySDK.AdaptyErrorCode.PaymentCancelled : AdaptySDK.AdaptyErrorCode = 2 public static const AdaptySDK.AdaptyErrorCode.PaymentInvalid : AdaptySDK.AdaptyErrorCode = 3 @@ -608,6 +661,7 @@ public static const AdaptySDK.AdaptyErrorCode.ProductPurchaseFailed : AdaptySDK. public static const AdaptySDK.AdaptyErrorCode.ProductRequestFailed : AdaptySDK.AdaptyErrorCode = 1002 public static const AdaptySDK.AdaptyErrorCode.ProfileWasChanged : AdaptySDK.AdaptyErrorCode = 3006 public static const AdaptySDK.AdaptyErrorCode.RefreshReceiptFailed : AdaptySDK.AdaptyErrorCode = 1010 +public static const AdaptySDK.AdaptyErrorCode.ResolverFailure : AdaptySDK.AdaptyErrorCode = 3202 public static const AdaptySDK.AdaptyErrorCode.ServerError : AdaptySDK.AdaptyErrorCode = 2004 public static const AdaptySDK.AdaptyErrorCode.StoreProductNotAvailable : AdaptySDK.AdaptyErrorCode = 5 public static const AdaptySDK.AdaptyErrorCode.UnauthorizedRequestData : AdaptySDK.AdaptyErrorCode = 10 @@ -640,6 +694,8 @@ public static const AdaptySDK.AdaptyRefundPreference.NoPreference : AdaptySDK.Ad public static const AdaptySDK.AdaptyServerCluster.CN : AdaptySDK.AdaptyServerCluster = 2 public static const AdaptySDK.AdaptyServerCluster.Default : AdaptySDK.AdaptyServerCluster = 0 public static const AdaptySDK.AdaptyServerCluster.EU : AdaptySDK.AdaptyServerCluster = 1 +public static const AdaptySDK.AdaptyStoreMessagesHandling.Auto : AdaptySDK.AdaptyStoreMessagesHandling = 0 +public static const AdaptySDK.AdaptyStoreMessagesHandling.Manual : AdaptySDK.AdaptyStoreMessagesHandling = 1 public static const AdaptySDK.AdaptySubscriptionOfferType.Code : AdaptySDK.AdaptySubscriptionOfferType = 3 public static const AdaptySDK.AdaptySubscriptionOfferType.Introductory : AdaptySDK.AdaptySubscriptionOfferType = 0 public static const AdaptySDK.AdaptySubscriptionOfferType.Promotional : AdaptySDK.AdaptySubscriptionOfferType = 1 @@ -680,4 +736,12 @@ public static readonly AdaptySDK.AdaptyExternalAttributionProvider.Tenjin : Adap public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.Default : AdaptySDK.AdaptyPlacementFetchPolicy public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.ReloadRevalidatingCacheData : AdaptySDK.AdaptyPlacementFetchPolicy public static readonly AdaptySDK.AdaptyPlacementFetchPolicy.ReturnCacheDataElseLoad : AdaptySDK.AdaptyPlacementFetchPolicy -public virtual AdaptySDK.AdaptyExternalAttributionProvider.Equals(AdaptySDK.AdaptyExternalAttributionProvider other) : System.Boolean \ No newline at end of file +public static readonly AdaptySDK.AdaptyStoreMessageType.BillingIssue : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.Generic : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.PriceIncreaseConsent : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptyStoreMessageType.WinBackOffer : AdaptySDK.AdaptyStoreMessageType +public static readonly AdaptySDK.AdaptySubscriptionBillingPlan.Monthly : AdaptySDK.AdaptySubscriptionBillingPlan +public static readonly AdaptySDK.AdaptySubscriptionBillingPlan.UpFront : AdaptySDK.AdaptySubscriptionBillingPlan +public virtual AdaptySDK.AdaptyExternalAttributionProvider.Equals(AdaptySDK.AdaptyExternalAttributionProvider other) : System.Boolean +public virtual AdaptySDK.AdaptyStoreMessageType.Equals(AdaptySDK.AdaptyStoreMessageType other) : System.Boolean +public virtual AdaptySDK.AdaptySubscriptionBillingPlan.Equals(AdaptySDK.AdaptySubscriptionBillingPlan other) : System.Boolean \ No newline at end of file diff --git a/tests/shared/Fixtures/approved/request-configuration-kids.ios.approved.txt b/tests/shared/Fixtures/approved/request-configuration-kids.ios.approved.txt index 9c419dcf..5e8f1432 100644 --- a/tests/shared/Fixtures/approved/request-configuration-kids.ios.approved.txt +++ b/tests/shared/Fixtures/approved/request-configuration-kids.ios.approved.txt @@ -20,5 +20,6 @@ "memory_storage_total_cost_limit": 100 }, "observer_mode": true, - "server_cluster": "eu" + "server_cluster": "eu", + "store_messages_handling": "manual" } diff --git a/tests/shared/Fixtures/approved/request-configuration.android.approved.txt b/tests/shared/Fixtures/approved/request-configuration.android.approved.txt index da75c6ab..b0b2e121 100644 --- a/tests/shared/Fixtures/approved/request-configuration.android.approved.txt +++ b/tests/shared/Fixtures/approved/request-configuration.android.approved.txt @@ -20,5 +20,6 @@ "memory_storage_total_cost_limit": 100 }, "observer_mode": true, - "server_cluster": "eu" + "server_cluster": "eu", + "store_messages_handling": "manual" } diff --git a/tests/shared/Fixtures/approved/request-configuration.editor.approved.txt b/tests/shared/Fixtures/approved/request-configuration.editor.approved.txt index da75c6ab..b0b2e121 100644 --- a/tests/shared/Fixtures/approved/request-configuration.editor.approved.txt +++ b/tests/shared/Fixtures/approved/request-configuration.editor.approved.txt @@ -20,5 +20,6 @@ "memory_storage_total_cost_limit": 100 }, "observer_mode": true, - "server_cluster": "eu" + "server_cluster": "eu", + "store_messages_handling": "manual" } diff --git a/tests/shared/Fixtures/approved/request-configuration.ios.approved.txt b/tests/shared/Fixtures/approved/request-configuration.ios.approved.txt index da75c6ab..b0b2e121 100644 --- a/tests/shared/Fixtures/approved/request-configuration.ios.approved.txt +++ b/tests/shared/Fixtures/approved/request-configuration.ios.approved.txt @@ -20,5 +20,6 @@ "memory_storage_total_cost_limit": 100 }, "observer_mode": true, - "server_cluster": "eu" + "server_cluster": "eu", + "store_messages_handling": "manual" } diff --git a/tests/shared/Fixtures/approved/request-flow-full.android.approved.txt b/tests/shared/Fixtures/approved/request-flow-full.android.approved.txt index 4daf9287..2f2f4a05 100644 --- a/tests/shared/Fixtures/approved/request-flow-full.android.approved.txt +++ b/tests/shared/Fixtures/approved/request-flow-full.android.approved.txt @@ -56,6 +56,7 @@ ] }, "variation_id": "variation-0001", + "variation_name": "Variation A", "variations": [ { "paywall_id": "paywall-0001", diff --git a/tests/shared/Fixtures/approved/request-flow-full.editor.approved.txt b/tests/shared/Fixtures/approved/request-flow-full.editor.approved.txt index a48bf950..f7a44c3b 100644 --- a/tests/shared/Fixtures/approved/request-flow-full.editor.approved.txt +++ b/tests/shared/Fixtures/approved/request-flow-full.editor.approved.txt @@ -56,6 +56,7 @@ ] }, "variation_id": "variation-0001", + "variation_name": "Variation A", "variations": [ { "paywall_id": "paywall-0001", diff --git a/tests/shared/Fixtures/approved/request-flow-full.ios.approved.txt b/tests/shared/Fixtures/approved/request-flow-full.ios.approved.txt index 28cfa265..fcd791a1 100644 --- a/tests/shared/Fixtures/approved/request-flow-full.ios.approved.txt +++ b/tests/shared/Fixtures/approved/request-flow-full.ios.approved.txt @@ -56,6 +56,7 @@ ] }, "variation_id": "variation-0001", + "variation_name": "Variation A", "variations": [ { "paywall_id": "paywall-0001", @@ -73,10 +74,20 @@ "access_level_id": "premium", "adapty_product_id": "adapty-product-1", "flow_product_id": "flow-product-1", + "pricing_terms": [ + { + "billing_plan_id": "monthly", + "promotional_offer_id": "promo-1" + }, + { + "billing_plan_id": "up_front", + "future_key": "kept as received", + "promotional_offer_id": "promo-1", + "win_back_offer_id": "winback-1" + } + ], "product_type": "subscription", - "promotional_offer_id": "promo-1", - "vendor_product_id": "com.adapty.sample.monthly", - "win_back_offer_id": "winback-1" + "vendor_product_id": "com.adapty.sample.monthly" }, { "access_level_id": "premium", diff --git a/tests/shared/Fixtures/approved/request-product-plan-only.android.approved.txt b/tests/shared/Fixtures/approved/request-product-plan-only.android.approved.txt new file mode 100644 index 00000000..6f8a601d --- /dev/null +++ b/tests/shared/Fixtures/approved/request-product-plan-only.android.approved.txt @@ -0,0 +1,10 @@ +{ + "access_level_id": "premium", + "adapty_product_id": "adapty-product-3", + "paywall_ab_test_name": "winter_test", + "paywall_name": "Winter Paywall", + "paywall_product_index": 2, + "paywall_variation_id": "variation-0001", + "product_type": "subscription", + "vendor_product_id": "com.adapty.sample.yearly.monthly" +} diff --git a/tests/shared/Fixtures/approved/request-product-plan-only.editor.approved.txt b/tests/shared/Fixtures/approved/request-product-plan-only.editor.approved.txt new file mode 100644 index 00000000..6f8a601d --- /dev/null +++ b/tests/shared/Fixtures/approved/request-product-plan-only.editor.approved.txt @@ -0,0 +1,10 @@ +{ + "access_level_id": "premium", + "adapty_product_id": "adapty-product-3", + "paywall_ab_test_name": "winter_test", + "paywall_name": "Winter Paywall", + "paywall_product_index": 2, + "paywall_variation_id": "variation-0001", + "product_type": "subscription", + "vendor_product_id": "com.adapty.sample.yearly.monthly" +} diff --git a/tests/shared/Fixtures/approved/request-product-plan-only.ios.approved.txt b/tests/shared/Fixtures/approved/request-product-plan-only.ios.approved.txt new file mode 100644 index 00000000..79b1096c --- /dev/null +++ b/tests/shared/Fixtures/approved/request-product-plan-only.ios.approved.txt @@ -0,0 +1,15 @@ +{ + "access_level_id": "premium", + "adapty_product_id": "adapty-product-3", + "paywall_ab_test_name": "winter_test", + "paywall_name": "Winter Paywall", + "paywall_product_index": 2, + "paywall_variation_id": "variation-0001", + "product_type": "subscription", + "subscription": { + "pricing_terms": { + "billing_plan_id": "monthly" + } + }, + "vendor_product_id": "com.adapty.sample.yearly.monthly" +} diff --git a/tests/shared/Fixtures/approved/request-product-with-offer.ios.approved.txt b/tests/shared/Fixtures/approved/request-product-with-offer.ios.approved.txt index b7a3b414..43cb1739 100644 --- a/tests/shared/Fixtures/approved/request-product-with-offer.ios.approved.txt +++ b/tests/shared/Fixtures/approved/request-product-with-offer.ios.approved.txt @@ -13,6 +13,9 @@ "id": "intro-1", "type": "introductory" } + }, + "pricing_terms": { + "billing_plan_id": "up_front" } }, "vendor_product_id": "com.adapty.sample.monthly", diff --git a/tests/shared/Fixtures/approved/request-promoted-product-with-offer.android.approved.txt b/tests/shared/Fixtures/approved/request-promoted-product-with-offer.android.approved.txt index b32b98e5..c9a93dee 100644 --- a/tests/shared/Fixtures/approved/request-promoted-product-with-offer.android.approved.txt +++ b/tests/shared/Fixtures/approved/request-promoted-product-with-offer.android.approved.txt @@ -1,5 +1,6 @@ { "payload_data": "{\"custom\":\"promoted payload\"}", + "purchase_intent_id": "intent-1", "subscription": { "offer": { "offer_identifier": { diff --git a/tests/shared/Fixtures/approved/request-promoted-product-with-offer.editor.approved.txt b/tests/shared/Fixtures/approved/request-promoted-product-with-offer.editor.approved.txt index b32b98e5..c9a93dee 100644 --- a/tests/shared/Fixtures/approved/request-promoted-product-with-offer.editor.approved.txt +++ b/tests/shared/Fixtures/approved/request-promoted-product-with-offer.editor.approved.txt @@ -1,5 +1,6 @@ { "payload_data": "{\"custom\":\"promoted payload\"}", + "purchase_intent_id": "intent-1", "subscription": { "offer": { "offer_identifier": { diff --git a/tests/shared/Fixtures/approved/request-promoted-product-with-offer.ios.approved.txt b/tests/shared/Fixtures/approved/request-promoted-product-with-offer.ios.approved.txt index b32b98e5..c4b8a9fc 100644 --- a/tests/shared/Fixtures/approved/request-promoted-product-with-offer.ios.approved.txt +++ b/tests/shared/Fixtures/approved/request-promoted-product-with-offer.ios.approved.txt @@ -1,11 +1,15 @@ { "payload_data": "{\"custom\":\"promoted payload\"}", + "purchase_intent_id": "intent-1", "subscription": { "offer": { "offer_identifier": { "id": "promo-1", "type": "promotional" } + }, + "pricing_terms": { + "billing_plan_id": "up_front" } }, "vendor_product_id": "com.adapty.sample.monthly" diff --git a/tests/shared/Fixtures/approved/transport-activate.editor.approved.txt b/tests/shared/Fixtures/approved/transport-activate.editor.approved.txt index 23ab469e..119b956d 100644 --- a/tests/shared/Fixtures/approved/transport-activate.editor.approved.txt +++ b/tests/shared/Fixtures/approved/transport-activate.editor.approved.txt @@ -21,7 +21,8 @@ "memory_storage_total_cost_limit": 100 }, "observer_mode": true, - "server_cluster": "eu" + "server_cluster": "eu", + "store_messages_handling": "manual" }, "method": "activate" } diff --git a/tests/shared/Fixtures/approved/transport-destroy-flow-view.editor.approved.txt b/tests/shared/Fixtures/approved/transport-destroy-flow-view.editor.approved.txt new file mode 100644 index 00000000..2c992cc8 --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-destroy-flow-view.editor.approved.txt @@ -0,0 +1,4 @@ +{ + "id": "view-1", + "method": "adapty_ui_destroy_flow_view" +} diff --git a/tests/shared/Fixtures/approved/transport-dismiss-flow-view-from-view.editor.approved.txt b/tests/shared/Fixtures/approved/transport-dismiss-flow-view-from-view.editor.approved.txt new file mode 100644 index 00000000..ee0fa883 --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-dismiss-flow-view-from-view.editor.approved.txt @@ -0,0 +1,5 @@ +{ + "destroy": true, + "id": "view-1", + "method": "adapty_ui_dismiss_flow_view" +} diff --git a/tests/shared/Fixtures/approved/transport-dismiss-flow-view-keep-alive.editor.approved.txt b/tests/shared/Fixtures/approved/transport-dismiss-flow-view-keep-alive.editor.approved.txt new file mode 100644 index 00000000..632fc7a8 --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-dismiss-flow-view-keep-alive.editor.approved.txt @@ -0,0 +1,5 @@ +{ + "destroy": false, + "id": "view-1", + "method": "adapty_ui_dismiss_flow_view" +} diff --git a/tests/shared/Fixtures/approved/transport-get-pending-store-message-types.editor.approved.txt b/tests/shared/Fixtures/approved/transport-get-pending-store-message-types.editor.approved.txt new file mode 100644 index 00000000..062d333a --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-get-pending-store-message-types.editor.approved.txt @@ -0,0 +1,3 @@ +{ + "method": "get_pending_store_message_types" +} diff --git a/tests/shared/Fixtures/approved/transport-make-promoted-purchase.editor.approved.txt b/tests/shared/Fixtures/approved/transport-make-promoted-purchase.editor.approved.txt index 9d1574d8..b156b0f4 100644 --- a/tests/shared/Fixtures/approved/transport-make-promoted-purchase.editor.approved.txt +++ b/tests/shared/Fixtures/approved/transport-make-promoted-purchase.editor.approved.txt @@ -2,6 +2,7 @@ "method": "make_promoted_purchase", "product": { "payload_data": "{\"custom\":\"promoted payload\"}", + "purchase_intent_id": "intent-1", "subscription": { "offer": { "offer_identifier": { diff --git a/tests/shared/Fixtures/approved/transport-preload-flows-for-default-audience.editor.approved.txt b/tests/shared/Fixtures/approved/transport-preload-flows-for-default-audience.editor.approved.txt new file mode 100644 index 00000000..93c6c3a0 --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-preload-flows-for-default-audience.editor.approved.txt @@ -0,0 +1,6 @@ +{ + "method": "preload_flows_for_default_audience", + "placement_ids": [ + "onboarding" + ] +} diff --git a/tests/shared/Fixtures/approved/transport-preload-flows-with-timeout.editor.approved.txt b/tests/shared/Fixtures/approved/transport-preload-flows-with-timeout.editor.approved.txt new file mode 100644 index 00000000..9690df3c --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-preload-flows-with-timeout.editor.approved.txt @@ -0,0 +1,7 @@ +{ + "load_timeout": 2.5, + "method": "preload_flows", + "placement_ids": [ + "onboarding" + ] +} diff --git a/tests/shared/Fixtures/approved/transport-preload-flows.editor.approved.txt b/tests/shared/Fixtures/approved/transport-preload-flows.editor.approved.txt new file mode 100644 index 00000000..cc7924e2 --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-preload-flows.editor.approved.txt @@ -0,0 +1,7 @@ +{ + "method": "preload_flows", + "placement_ids": [ + "onboarding", + "paywall" + ] +} diff --git a/tests/shared/Fixtures/approved/transport-show-store-messages-empty-filter.editor.approved.txt b/tests/shared/Fixtures/approved/transport-show-store-messages-empty-filter.editor.approved.txt new file mode 100644 index 00000000..99cfee07 --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-show-store-messages-empty-filter.editor.approved.txt @@ -0,0 +1,4 @@ +{ + "filter": [], + "method": "show_store_messages" +} diff --git a/tests/shared/Fixtures/approved/transport-show-store-messages-filtered.editor.approved.txt b/tests/shared/Fixtures/approved/transport-show-store-messages-filtered.editor.approved.txt new file mode 100644 index 00000000..72fa0b0b --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-show-store-messages-filtered.editor.approved.txt @@ -0,0 +1,7 @@ +{ + "filter": [ + "billing_issue", + "storekit_-42" + ], + "method": "show_store_messages" +} diff --git a/tests/shared/Fixtures/approved/transport-show-store-messages.editor.approved.txt b/tests/shared/Fixtures/approved/transport-show-store-messages.editor.approved.txt new file mode 100644 index 00000000..32b38dfa --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-show-store-messages.editor.approved.txt @@ -0,0 +1,3 @@ +{ + "method": "show_store_messages" +} diff --git a/tests/shared/Fixtures/responses/flow-full.json b/tests/shared/Fixtures/responses/flow-full.json index 2258f42a..33d22cda 100644 --- a/tests/shared/Fixtures/responses/flow-full.json +++ b/tests/shared/Fixtures/responses/flow-full.json @@ -10,6 +10,7 @@ "flow_id": "flow-0001", "flow_name": "Winter Flow", "variation_id": "variation-0001", + "variation_name": "Variation A", "flow_version_id": "flow-version-0001", "remote_configs": [ { @@ -42,8 +43,18 @@ "adapty_product_id": "adapty-product-1", "access_level_id": "premium", "product_type": "subscription", - "promotional_offer_id": "promo-1", - "win_back_offer_id": "winback-1", + "pricing_terms": [ + { + "billing_plan_id": "monthly", + "promotional_offer_id": "promo-1" + }, + { + "billing_plan_id": "up_front", + "promotional_offer_id": "promo-1", + "win_back_offer_id": "winback-1", + "future_key": "kept as received" + } + ], "base_plan_id": "base-plan-1", "offer_id": "offer-1" }, diff --git a/tests/shared/Fixtures/responses/products-full.json b/tests/shared/Fixtures/responses/products-full.json index 06d1c03a..22d7089b 100644 --- a/tests/shared/Fixtures/responses/products-full.json +++ b/tests/shared/Fixtures/responses/products-full.json @@ -24,6 +24,23 @@ "group_identifier": "group-1", "period": { "unit": "month", "number_of_units": 1 }, "localized_period": "1 month", + "pricing_terms": { + "billing_plan_id": "up_front", + "billing_price": { + "amount": 9.99, + "currency_code": "USD", + "localized_string": "$9.99" + }, + "billing_period": { "unit": "month", "number_of_units": 1 }, + "commitment_info": { + "price": { + "amount": 9.99, + "currency_code": "USD", + "localized_string": "$9.99" + }, + "period": { "unit": "month", "number_of_units": 1 } + } + }, "renewal_type": "prepaid", "base_plan_id": "base-plan-1", "offer": { @@ -66,5 +83,48 @@ "currency_symbol": "$", "localized_string": "$99.00" } + }, + { + "vendor_product_id": "com.adapty.sample.yearly.monthly", + "adapty_product_id": "adapty-product-3", + "access_level_id": "premium", + "product_type": "subscription", + "paywall_product_index": 2, + "paywall_variation_id": "variation-0001", + "paywall_ab_test_name": "winter_test", + "paywall_name": "Winter Paywall", + "localized_description": "A year of access, paid monthly", + "localized_title": "Yearly, monthly payments", + "is_family_shareable": false, + "price": { + "amount": 83.88, + "currency_code": "EUR", + "currency_symbol": "€", + "localized_string": "€83.88" + }, + "subscription": { + "group_identifier": "group-1", + "period": { "unit": "year", "number_of_units": 1 }, + "localized_period": "1 year", + "pricing_terms": { + "billing_plan_id": "monthly", + "billing_price": { + "amount": 6.99, + "currency_code": "EUR", + "localized_string": "€6.99" + }, + "billing_period": { "unit": "month", "number_of_units": 1 }, + "commitment_info": { + "price": { + "amount": 83.88, + "currency_code": "EUR", + "localized_string": "€83.88" + }, + "period": { "unit": "year", "number_of_units": 1 } + } + }, + "renewal_type": "autorenewable", + "base_plan_id": "base-plan-yearly" + } } ] diff --git a/tests/shared/Fixtures/responses/profile-full.json b/tests/shared/Fixtures/responses/profile-full.json index 357979ce..a189b4c1 100644 --- a/tests/shared/Fixtures/responses/profile-full.json +++ b/tests/shared/Fixtures/responses/profile-full.json @@ -26,6 +26,12 @@ "unsubscribed_at": "2026-07-20T10:00:00.000Z", "billing_issue_detected_at": "2026-07-19T10:00:00.000Z", "cancellation_reason": "voluntarily_cancelled", + "billing_plan_id": "monthly", + "commitment": { + "billing_period_number": 7, + "total_billing_periods": 12, + "expires_at": "2027-01-15T09:30:00.000Z" + }, "is_refund": false } }, @@ -51,7 +57,28 @@ "active_promotional_offer_type": "promotional", "active_promotional_offer_id": "promo-winter", "offer_id": "offer-1", - "cancellation_reason": "voluntarily_cancelled" + "cancellation_reason": "voluntarily_cancelled", + "billing_plan_id": "monthly", + "commitment": { + "billing_period_number": 7, + "total_billing_periods": 12, + "expires_at": "2027-01-15T09:30:00.123456789+0000" + } + }, + "com.adapty.sample.yearly:base-plan-yearly": { + "store": "play_store", + "vendor_product_id": "com.adapty.sample.yearly:base-plan-yearly", + "vendor_transaction_id": "GPA.3300-0000-0000-00001", + "vendor_original_transaction_id": "GPA.3300-0000-0000-00001", + "is_active": false, + "is_lifetime": false, + "activated_at": "2025-03-01T08:00:00.000Z", + "expires_at": "2026-03-01T08:00:00.000Z", + "is_in_grace_period": false, + "is_refund": false, + "is_sandbox": false, + "will_renew": false, + "offer_id": "offer-yearly-intro" } }, "non_subscriptions": { @@ -70,5 +97,8 @@ }, "timestamp": 1753876800000, "is_test_user": true, - "applied_attribution_sources": ["appsflyer", "adjust"] + "applied_attribution_sources": [ + "appsflyer", + "adjust" + ] } diff --git a/tests/shared/Fixtures/responses/promoted-product-full.json b/tests/shared/Fixtures/responses/promoted-product-full.json index 977f7a46..34cd28dc 100644 --- a/tests/shared/Fixtures/responses/promoted-product-full.json +++ b/tests/shared/Fixtures/responses/promoted-product-full.json @@ -1,4 +1,5 @@ { + "purchase_intent_id": "intent-1", "vendor_product_id": "com.adapty.sample.monthly", "localized_description": "Full access, billed monthly", "localized_title": "Monthly", @@ -17,6 +18,29 @@ "number_of_units": 1 }, "localized_period": "1 month", + "pricing_terms": { + "billing_plan_id": "up_front", + "billing_price": { + "amount": 9.99, + "currency_code": "USD", + "localized_string": "$9.99" + }, + "billing_period": { + "unit": "month", + "number_of_units": 1 + }, + "commitment_info": { + "price": { + "amount": 9.99, + "currency_code": "USD", + "localized_string": "$9.99" + }, + "period": { + "unit": "month", + "number_of_units": 1 + } + } + }, "renewal_type": "autorenewable", "base_plan_id": "base-plan-1", "offer": { diff --git a/tests/shared/Samples.cs b/tests/shared/Samples.cs index 955610a6..7b8b47bf 100644 --- a/tests/shared/Samples.cs +++ b/tests/shared/Samples.cs @@ -16,6 +16,7 @@ public static AdaptyConfiguration Configuration() => .SetObserverMode(true) .SetIPAddressCollectionDisabled(true) .SetServerCluster(AdaptyServerCluster.EU) + .SetStoreMessagesHandling(AdaptyStoreMessagesHandling.Manual) .SetBackendProxy("proxy.example.com", 8080) .SetAdaptyUIMediaCache(100, 200, 300) .Build(); From 17ba73601bddbc901857ae64379072a275ead5ca Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Wed, 28 Oct 2026 21:40:53 +0100 Subject: [PATCH 02/11] chore: prepare 4.3.0: version, changelog, install check on 6.0 SDKVersion, package.json and the README install URL move to 4.3.0. The changelog section gets its 4.3.0 heading, the iOS-only error codes their tag, and _upm.changelog the same set of entries in short. The .unitypackage install path was verified on 6000.0.74f1: a clean project, the import, Install Dependencies, a compile. AGENTS.md says the floor raise ships in 4.3.0, and that the Android bridge takes no filter for ShowStoreMessages rather than rejecting one. --- AGENTS.md | 4 ++-- Packages/com.adapty.unity-sdk/CHANGELOG.md | 8 +++++--- Packages/com.adapty.unity-sdk/Runtime/Adapty.cs | 2 +- Packages/com.adapty.unity-sdk/package.json | 4 ++-- README.md | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 8f51fdea..3f2dc4dd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,7 +13,7 @@ This is a **Unity project** (Unity 6000.x) — the player is built and tested th The package declares **Unity 6.0 (6000.0) and newer** as `unity` in `package.json` — raised from 2022.3 on 2026-09-01 so the package may use UI Toolkit runtime bindings (2023.2+) for the Editor mock UI — and that floor is what all package code may assume. Demo-only code under `Assets/` may go further (the project itself runs 6.6). -The floor raise is unreleased: 4.1.x shipped on 2022.3, and its install path — `.unitypackage` import into a clean project, then `Adapty SDK > Install Dependencies`, then a compile — was verified on 2022.3.62f3. Before the release that carries the raise, verify that path on a 6000.0.x build and say so in the changelog entry (there is one under Unreleased); do not widen it to claim device or build coverage on 6000.0. `MIGRATION-v3.17-to-v4.1.md` describes 4.1 as it shipped and is not edited for later floors. +The floor raise ships in 4.3.0. 4.1.x shipped on 2022.3, and its install path — `.unitypackage` import into a clean project, then `Adapty SDK > Install Dependencies`, then a compile — was verified on 2022.3.62f3; for 4.3.0 the same path was verified on 6000.0.74f1, headless, and the 4.3.0 changelog entry says so. Do not widen that to claim device or build coverage on 6000.0. `MIGRATION-v3.17-to-v4.1.md` describes 4.1 as it shipped and is not edited for later floors. **Run the JSON layer tests:** ```bash @@ -126,7 +126,7 @@ Not every `[RuntimeInitializeOnLoadMethod]` here is a reset. `Adapty.InitializeT ### Platform conditionals -There are 29 `#if` in the package, and each belongs to one of five kinds. **Compilation boundary**, 7 — a native symbol exists only there: the `_Adapty` and `_AdaptyCallbackAction` aliases, everything under `Plugins/iOS` and `Plugins/Android`, the Kids Mode post-processor. **Wire contract**, 14 — the contract itself differs: a `[DataMember]` the schema marks platform-only (`is_family_shareable` on both product responses, `pricing_terms` read and handed back on iOS alone), a key the schema requires on one platform only (`currency_code` and `localized_string` of a price on iOS), `offer_tags` read on Android alone, the offer id required on one more branch there. **Public API behaviour**, 5 — the iOS-only methods that on an Android device report `null`, meaning success, `GetPendingStoreMessageTypes`, which reports a null list there, and the filter `ShowStoreMessages` sends on iOS alone, because the Android bridge rejects the key. Their guard is `UNITY_IOS || UNITY_EDITOR` rather than `UNITY_IOS && !UNITY_EDITOR`, so the Editor reaches the no-op bridge like every other method instead of taking that branch; `TransportTests` cases pin it. **Where a file actually is**, 2 — a `StreamingAssets` path is a different location on each platform, and the two places that resolve one do **not** agree about the Editor. `AdaptyCustomAssetPath.Resolve` has an `#else` and hands the path back unchanged. `Adapty.SetFallback` has none, so in the Editor it sends no `path` key at all — `transport-set-fallback.editor.approved.txt` is the whole request, `{"method": "set_fallback"}`. Nothing is lost by that: the Editor call reaches the no-op bridge and comes back with the not-supported error, having never needed a path. It is not an omission to repair. **The Kids Mode define**, 1 — `AdaptyConfiguration` forces `apple_idfa_collection_disabled` under `ADAPTY_KIDS_MODE && UNITY_IOS`, because the trait has compiled IDFA out of the binary and the request has to say so. +There are 29 `#if` in the package, and each belongs to one of five kinds. **Compilation boundary**, 7 — a native symbol exists only there: the `_Adapty` and `_AdaptyCallbackAction` aliases, everything under `Plugins/iOS` and `Plugins/Android`, the Kids Mode post-processor. **Wire contract**, 14 — the contract itself differs: a `[DataMember]` the schema marks platform-only (`is_family_shareable` on both product responses, `pricing_terms` read and handed back on iOS alone), a key the schema requires on one platform only (`currency_code` and `localized_string` of a price on iOS), `offer_tags` read on Android alone, the offer id required on one more branch there. **Public API behaviour**, 5 — the iOS-only methods that on an Android device report `null`, meaning success, `GetPendingStoreMessageTypes`, which reports a null list there, and the filter `ShowStoreMessages` sends on iOS alone, because the Android bridge takes no filter. Their guard is `UNITY_IOS || UNITY_EDITOR` rather than `UNITY_IOS && !UNITY_EDITOR`, so the Editor reaches the no-op bridge like every other method instead of taking that branch; `TransportTests` cases pin it. **Where a file actually is**, 2 — a `StreamingAssets` path is a different location on each platform, and the two places that resolve one do **not** agree about the Editor. `AdaptyCustomAssetPath.Resolve` has an `#else` and hands the path back unchanged. `Adapty.SetFallback` has none, so in the Editor it sends no `path` key at all — `transport-set-fallback.editor.approved.txt` is the whole request, `{"method": "set_fallback"}`. Nothing is lost by that: the Editor call reaches the no-op bridge and comes back with the not-supported error, having never needed a path. It is not an omission to repair. **The Kids Mode define**, 1 — `AdaptyConfiguration` forces `apple_idfa_collection_disabled` under `ADAPTY_KIDS_MODE && UNITY_IOS`, because the trait has compiled IDFA out of the binary and the request has to say so. The last two kinds are not platform questions the layer above could have answered, which is why they are here rather than folded away. Nothing else qualifies. A constructor must not re-decide by define what the layer above already decided: `AdaptySubscriptionOffer` used to null `OfferTags` off Android although its only caller, the converter, passes null there anyway — the approved snapshots did not move when it went, which is what redundant means. diff --git a/Packages/com.adapty.unity-sdk/CHANGELOG.md b/Packages/com.adapty.unity-sdk/CHANGELOG.md index 79e41674..9d9cc9f5 100644 --- a/Packages/com.adapty.unity-sdk/CHANGELOG.md +++ b/Packages/com.adapty.unity-sdk/CHANGELOG.md @@ -4,13 +4,15 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [4.3.0] - 2026-10-28 ### Breaking Changes - **The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0)**, declared as `unity` in `package.json`. The package will rely on UI Toolkit runtime bindings (2023.2+) for - its Editor-side mock UI; projects on 2022.3 stay on 4.1.x. + its Editor-side mock UI; projects on 2022.3 stay on 4.1.x. The `.unitypackage` install path — + import into a clean project, `Adapty SDK > Install Dependencies`, compile — was verified on + 6000.0.74f1. ### Added @@ -38,7 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `Adapty.ShowStoreMessages`, on iOS optionally filtered by `AdaptyStoreMessageType`. `Adapty.GetPendingStoreMessageTypes` lists what is held on iOS and reports a null list on Android. On iOS all of it needs iOS 16+. -- `AdaptyErrorCode.BillingPlanUnavailable` (1060), `OperationInProgress` (3201) and +- [iOS] `AdaptyErrorCode.BillingPlanUnavailable` (1060), `OperationInProgress` (3201) and `ResolverFailure` (3202). ### Changed diff --git a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs index 16a119de..85c7ede8 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs @@ -15,7 +15,7 @@ public static partial class Adapty /// /// The version of the Adapty SDK. /// - public static readonly string SDKVersion = "4.1.2"; + public static readonly string SDKVersion = "4.3.0"; /// /// Use this method to initialize the Adapty SDK. diff --git a/Packages/com.adapty.unity-sdk/package.json b/Packages/com.adapty.unity-sdk/package.json index 276bd142..e739fc9f 100644 --- a/Packages/com.adapty.unity-sdk/package.json +++ b/Packages/com.adapty.unity-sdk/package.json @@ -1,11 +1,11 @@ { "name": "com.adapty.unity-sdk", - "version": "4.1.2", + "version": "4.3.0", "displayName": "Adapty Unity SDK", "description": "Unity SDK for Adapty in-app purchases, subscriptions, paywalls, and onboarding flows.", "unity": "6000.0", "_upm": { - "changelog": "### Fixed\n\n- [iOS] Flow analytics events reported numeric parameters valued 0 or 1 as booleans.\n- [Android] Various bugfixes and stability improvements." + "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point." }, "dependencies": { "com.unity.nuget.newtonsoft-json": "3.2.2" diff --git a/README.md b/README.md index 3410a95f..1b4719b2 100755 --- a/README.md +++ b/README.md @@ -101,10 +101,10 @@ so start new integrations on flows. does not sit at the repository root — and the version suffix, which pins the tag: ``` -https://github.com/adaptyteam/AdaptySDK-Unity.git?path=/Packages/com.adapty.unity-sdk#4.1.2 +https://github.com/adaptyteam/AdaptySDK-Unity.git?path=/Packages/com.adapty.unity-sdk#4.3.0 ``` -Drop `#4.1.2` and Package Manager resolves the default branch instead, which moves with every +Drop `#4.3.0` and Package Manager resolves the default branch instead, which moves with every release — you get whatever was merged into `main` last, and it changes under you without notice. Pin the tag. From 117f96c105eab8c00be5557db9ebab2876f13058 Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Wed, 28 Oct 2026 22:02:08 +0100 Subject: [PATCH 03/11] docs: how the harness buys on an Android device The account has to be a license tester, or MakePurchase fails at once with StoreProductNotAvailable. Play's Subscribe button ignores injected touches but takes keys: Tab until uiautomator shows it focused, then Enter. Xiaomi needs USB debugging (Security settings) for adb input and may kill the harness behind the sheet; an owned subscription raises no sheet. --- Assets/SdkHarness/AGENTS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/SdkHarness/AGENTS.md b/Assets/SdkHarness/AGENTS.md index 7f85fe32..7b09c64c 100644 --- a/Assets/SdkHarness/AGENTS.md +++ b/Assets/SdkHarness/AGENTS.md @@ -48,4 +48,6 @@ unity command harness_status --runtime-path rt ``` Two things the CLI checks on the pulled copy, and deletes it when they fail: `pid` has to be a live process of the current user on the host (the device pid is meaningless here, and pid 1 is refused) — rewrite it to a long-lived one such as the Hub's; and `lastHeartbeat` has to be recent — rewrite it before each command, the device server does not touch its file on heartbeats. The Editor's Android Logcat restarts the adb server, which drops the forward: re-add it before each command too. `adb shell input tap`/`keyevent` do reach the flow. -A flow is an Activity of its own on Android, and Unity's player loop is paused underneath it: `harness_call` (a post to the main thread) times out until the flow is gone, `harness_events` still answers. The SDK's callbacks are delivered through the Unity thread's native looper, which keeps running through the pause, so a `flow_view_did_perform_action` for Back or close shows up in `harness_events` within seconds — that is the check that the bridge delivers while paused, and it is what the demo app relies on to dismiss the view on close. The way back goes through the same looper: the harness grants a permission and reports an observer-mode purchase from a pool thread, as an app's OS or store callback would, and logs it (`SdkHarness: purchase reported from a pool thread`); in Observer mode the native `observerModeHandler: onStartPurchase called` follows in logcat within milliseconds while the flow is on screen. `adb shell input tap` does nothing on some devices (Xiaomi needs USB debugging's security settings); `input keyevent KEYCODE_TAB` until the button has focus, then `KEYCODE_ENTER`, presses it. The harness itself dismisses nothing: bring `UnityPlayerActivity` back with `am start -f 0x20000000`, which ends the flow and resumes the loop. +A flow is an Activity of its own on Android, and Unity's player loop is paused underneath it: `harness_call` (a post to the main thread) times out until the flow is gone, `harness_events` still answers. The SDK's callbacks are delivered through the Unity thread's native looper, which keeps running through the pause, so a `flow_view_did_perform_action` for Back or close shows up in `harness_events` within seconds — that is the check that the bridge delivers while paused, and it is what the demo app relies on to dismiss the view on close. The way back goes through the same looper: the harness grants a permission and reports an observer-mode purchase from a pool thread, as an app's OS or store callback would, and logs it (`SdkHarness: purchase reported from a pool thread`); in Observer mode the native `observerModeHandler: onStartPurchase called` follows in logcat within milliseconds while the flow is on screen. The harness itself dismisses nothing: bring `UnityPlayerActivity` back with `am start -f 0x20000000`, which ends the flow and resumes the loop. + +A purchase on a device goes to Google Play for real, so the account on the device has to be a license tester on a track `com.adaptytest` is published to — otherwise `MakePurchase` fails at once with `StoreProductNotAvailable` (Play's `ITEM_UNAVAILABLE`) and no sheet; a tester's sheet says "Test card, always approves", and a test subscription renews every five minutes. The sheet pauses the player loop like a flow does, so call `MakePurchase` with a short `--timeout_ms` and read the outcome from `GetProfile` once `UnityPlayerActivity` is back on top (`adb shell dumpsys activity activities | grep topResumedActivity`). Play's Subscribe button ignores injected touches — `input tap` on it does nothing while the rest of the sheet takes taps — but not keys: send `input keyevent KEYCODE_TAB` one at a time, `uiautomator dump` after each until the button's node is `focused="true"`, then `KEYCODE_ENTER`. On Xiaomi, `adb` input needs Developer options > USB debugging (Security settings) and an `adb reconnect` after it, installing needs Install via USB, and MIUI may kill the harness behind the sheet, which leaves the purchase unfinished: relaunch, pull the descriptor again and activate. A subscription the account already owns raises no sheet, so let a test one lapse or take another product; the test app's paywalls carry subscriptions only. From 38c8d71513cecabeed3363fea5b7df62016401eb Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Thu, 29 Oct 2026 21:14:09 +0100 Subject: [PATCH 04/11] feat: optional JWS in ReportTransaction on iOS ReportTransaction takes appleJWSTransaction and sends it as apple_jws_transaction on iOS, as AdaptySDK-iOS 4.3.2 reads it. The contract copy is taken from the iOS release/4.3.2 branch; the native pin stays at 4.3.1 until 4.3.2 is tagged. --- Packages/com.adapty.unity-sdk/CHANGELOG.md | 3 +++ .../Runtime/Adapty.Overloads.cs | 17 ++++++++++++++++- Packages/com.adapty.unity-sdk/Runtime/Adapty.cs | 8 ++++++++ Packages/com.adapty.unity-sdk/package.json | 2 +- cross_platform.yaml | 3 ++- tests/AdaptySDK.NextTests/TransportTests.cs | 10 ++++++++++ .../public-surface.android.approved.txt | 1 + .../approved/public-surface.editor.approved.txt | 1 + .../approved/public-surface.ios.approved.txt | 1 + ...ort-transaction-jws-only.editor.approved.txt | 5 +++++ ...t-report-transaction-jws.editor.approved.txt | 6 ++++++ 11 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 tests/shared/Fixtures/approved/transport-report-transaction-jws-only.editor.approved.txt create mode 100644 tests/shared/Fixtures/approved/transport-report-transaction-jws.editor.approved.txt diff --git a/Packages/com.adapty.unity-sdk/CHANGELOG.md b/Packages/com.adapty.unity-sdk/CHANGELOG.md index 9d9cc9f5..a253820a 100644 --- a/Packages/com.adapty.unity-sdk/CHANGELOG.md +++ b/Packages/com.adapty.unity-sdk/CHANGELOG.md @@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Android. On iOS all of it needs iOS 16+. - [iOS] `AdaptyErrorCode.BillingPlanUnavailable` (1060), `OperationInProgress` (3201) and `ResolverFailure` (3202). +- [iOS] `Adapty.ReportTransaction` takes an optional `appleJWSTransaction`: in Observer mode, + pass the JWS of the reported StoreKit 2 transaction when your purchase library provides it. It + is sent as is and not sent on Android. ### Changed diff --git a/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs b/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs index 0e4e8b9f..92908e44 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs @@ -71,7 +71,22 @@ Action completionHandler public static void ReportTransaction( string transactionId, Action completionHandler - ) => ReportTransaction(transactionId, null, completionHandler); + ) => ReportTransaction(transactionId, null, null, completionHandler); + + /// + /// Reports a transaction to Adapty in Observer mode, assigning it to a variation. + /// + /// + /// See . + /// + /// A string identifier of your purchased transaction. + /// An optional string identifier of the variation. + /// The action that will be called with the result. + public static void ReportTransaction( + string transactionId, + string variationId, + Action completionHandler + ) => ReportTransaction(transactionId, variationId, null, completionHandler); /// /// Updates external attribution data for the profile to track user acquisition sources. diff --git a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs index 85c7ede8..84ca1cb6 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs @@ -688,10 +688,12 @@ Action completionHandler /// /// A string identifier of your purchased transaction. For iOS, use the transaction identifier from SKPaymentTransaction. For Android, use the order ID from the purchase object (`purchase.getOrderId()`). /// An optional string identifier of the variation. You can get it using the property of . + /// iOS only. The JWS (`VerificationResult.jwsRepresentation`) of the same StoreKit 2 transaction as , when your purchase library provides it. Sent as is; not sent on Android. /// The action that will be called with the result. public static void ReportTransaction( string transactionId, string variationId, + string appleJWSTransaction, Action completionHandler ) { @@ -701,6 +703,12 @@ Action completionHandler { parameters["variation_id"] = variationId; } +#if UNITY_IOS || UNITY_EDITOR + if (appleJWSTransaction != null) + { + parameters["apple_jws_transaction"] = appleJWSTransaction; + } +#endif AdaptyRequest.SendVoid("report_transaction", parameters, completionHandler); } diff --git a/Packages/com.adapty.unity-sdk/package.json b/Packages/com.adapty.unity-sdk/package.json index e739fc9f..d9d11441 100644 --- a/Packages/com.adapty.unity-sdk/package.json +++ b/Packages/com.adapty.unity-sdk/package.json @@ -5,7 +5,7 @@ "description": "Unity SDK for Adapty in-app purchases, subscriptions, paywalls, and onboarding flows.", "unity": "6000.0", "_upm": { - "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point." + "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction` takes an optional `appleJWSTransaction`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point." }, "dependencies": { "com.unity.nuget.newtonsoft-json": "3.2.2" diff --git a/cross_platform.yaml b/cross_platform.yaml index 022062a2..e070b5db 100644 --- a/cross_platform.yaml +++ b/cross_platform.yaml @@ -1,5 +1,5 @@ $schema: "https://json-schema.org/draft/2020-12/schema" -$id: "https://adapty.io/crossPlatform/4.3.1/schema" +$id: "https://adapty.io/crossPlatform/4.3.2/schema" title: "Cross Platform Format" $requests: @@ -646,6 +646,7 @@ $requests: method: { const: "report_transaction" } variation_id: { type: string } transaction_id: { type: string } + apple_jws_transaction: { type: string } ReportTransaction.Response: #response type: object diff --git a/tests/AdaptySDK.NextTests/TransportTests.cs b/tests/AdaptySDK.NextTests/TransportTests.cs index ecd93aec..1a3bb7f5 100644 --- a/tests/AdaptySDK.NextTests/TransportTests.cs +++ b/tests/AdaptySDK.NextTests/TransportTests.cs @@ -345,6 +345,16 @@ TestCaseData Case(string name, string method, Action send) => "report_transaction", () => Adapty.ReportTransaction("txn-1", "variation-0001", _ => { }) ); + yield return Case( + "report-transaction-jws", + "report_transaction", + () => Adapty.ReportTransaction("txn-1", "variation-0001", "header.payload.signature", _ => { }) + ); + yield return Case( + "report-transaction-jws-only", + "report_transaction", + () => Adapty.ReportTransaction("txn-1", null, "header.payload.signature", _ => { }) + ); yield return Case( "restore-purchases", "restore_purchases", diff --git a/tests/shared/Fixtures/approved/public-surface.android.approved.txt b/tests/shared/Fixtures/approved/public-surface.android.approved.txt index a440fdfc..7ec9673b 100644 --- a/tests/shared/Fixtures/approved/public-surface.android.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.android.approved.txt @@ -564,6 +564,7 @@ public static AdaptySDK.Adapty.PreloadFlowsForDefaultAudience(System.Collections public static AdaptySDK.Adapty.PresentCodeRedemptionSheet(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.String appleJWSTransaction, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.RestorePurchases(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.SetEventListener(AdaptySDK.IAdaptyEventListener listener) : System.Void public static AdaptySDK.Adapty.SetFallback(System.String fileName, System.Action completionHandler) : System.Void diff --git a/tests/shared/Fixtures/approved/public-surface.editor.approved.txt b/tests/shared/Fixtures/approved/public-surface.editor.approved.txt index a440fdfc..7ec9673b 100644 --- a/tests/shared/Fixtures/approved/public-surface.editor.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.editor.approved.txt @@ -564,6 +564,7 @@ public static AdaptySDK.Adapty.PreloadFlowsForDefaultAudience(System.Collections public static AdaptySDK.Adapty.PresentCodeRedemptionSheet(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.String appleJWSTransaction, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.RestorePurchases(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.SetEventListener(AdaptySDK.IAdaptyEventListener listener) : System.Void public static AdaptySDK.Adapty.SetFallback(System.String fileName, System.Action completionHandler) : System.Void diff --git a/tests/shared/Fixtures/approved/public-surface.ios.approved.txt b/tests/shared/Fixtures/approved/public-surface.ios.approved.txt index a440fdfc..7ec9673b 100644 --- a/tests/shared/Fixtures/approved/public-surface.ios.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.ios.approved.txt @@ -564,6 +564,7 @@ public static AdaptySDK.Adapty.PreloadFlowsForDefaultAudience(System.Collections public static AdaptySDK.Adapty.PresentCodeRedemptionSheet(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.Action completionHandler) : System.Void +public static AdaptySDK.Adapty.ReportTransaction(System.String transactionId, System.String variationId, System.String appleJWSTransaction, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.RestorePurchases(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.SetEventListener(AdaptySDK.IAdaptyEventListener listener) : System.Void public static AdaptySDK.Adapty.SetFallback(System.String fileName, System.Action completionHandler) : System.Void diff --git a/tests/shared/Fixtures/approved/transport-report-transaction-jws-only.editor.approved.txt b/tests/shared/Fixtures/approved/transport-report-transaction-jws-only.editor.approved.txt new file mode 100644 index 00000000..62394458 --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-report-transaction-jws-only.editor.approved.txt @@ -0,0 +1,5 @@ +{ + "apple_jws_transaction": "header.payload.signature", + "method": "report_transaction", + "transaction_id": "txn-1" +} diff --git a/tests/shared/Fixtures/approved/transport-report-transaction-jws.editor.approved.txt b/tests/shared/Fixtures/approved/transport-report-transaction-jws.editor.approved.txt new file mode 100644 index 00000000..805ab34e --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-report-transaction-jws.editor.approved.txt @@ -0,0 +1,6 @@ +{ + "apple_jws_transaction": "header.payload.signature", + "method": "report_transaction", + "transaction_id": "txn-1", + "variation_id": "variation-0001" +} From 21a9bef62e1be956d2ee537b19925c27196a13b3 Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Thu, 29 Oct 2026 22:11:40 +0100 Subject: [PATCH 05/11] fix: drop an empty JWS from ReportTransaction, tighten its docs An empty appleJWSTransaction is not sent, as the contract omits rather than sends an empty value. The docs name the StoreKit 2 Transaction for transactionId, say to pass a null variationId to send the JWS alone, and the three-argument overload gets its full parameter docs back. AGENTS.md counts the new #if among the public API behaviour conditionals. --- AGENTS.md | 2 +- Packages/com.adapty.unity-sdk/CHANGELOG.md | 7 ++++--- Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs | 6 +++--- Packages/com.adapty.unity-sdk/Runtime/Adapty.cs | 6 +++--- Packages/com.adapty.unity-sdk/package.json | 2 +- tests/AdaptySDK.NextTests/TransportTests.cs | 5 +++++ ...nsport-report-transaction-jws-empty.editor.approved.txt | 4 ++++ 7 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 tests/shared/Fixtures/approved/transport-report-transaction-jws-empty.editor.approved.txt diff --git a/AGENTS.md b/AGENTS.md index 3f2dc4dd..1f3d6fd6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -126,7 +126,7 @@ Not every `[RuntimeInitializeOnLoadMethod]` here is a reset. `Adapty.InitializeT ### Platform conditionals -There are 29 `#if` in the package, and each belongs to one of five kinds. **Compilation boundary**, 7 — a native symbol exists only there: the `_Adapty` and `_AdaptyCallbackAction` aliases, everything under `Plugins/iOS` and `Plugins/Android`, the Kids Mode post-processor. **Wire contract**, 14 — the contract itself differs: a `[DataMember]` the schema marks platform-only (`is_family_shareable` on both product responses, `pricing_terms` read and handed back on iOS alone), a key the schema requires on one platform only (`currency_code` and `localized_string` of a price on iOS), `offer_tags` read on Android alone, the offer id required on one more branch there. **Public API behaviour**, 5 — the iOS-only methods that on an Android device report `null`, meaning success, `GetPendingStoreMessageTypes`, which reports a null list there, and the filter `ShowStoreMessages` sends on iOS alone, because the Android bridge takes no filter. Their guard is `UNITY_IOS || UNITY_EDITOR` rather than `UNITY_IOS && !UNITY_EDITOR`, so the Editor reaches the no-op bridge like every other method instead of taking that branch; `TransportTests` cases pin it. **Where a file actually is**, 2 — a `StreamingAssets` path is a different location on each platform, and the two places that resolve one do **not** agree about the Editor. `AdaptyCustomAssetPath.Resolve` has an `#else` and hands the path back unchanged. `Adapty.SetFallback` has none, so in the Editor it sends no `path` key at all — `transport-set-fallback.editor.approved.txt` is the whole request, `{"method": "set_fallback"}`. Nothing is lost by that: the Editor call reaches the no-op bridge and comes back with the not-supported error, having never needed a path. It is not an omission to repair. **The Kids Mode define**, 1 — `AdaptyConfiguration` forces `apple_idfa_collection_disabled` under `ADAPTY_KIDS_MODE && UNITY_IOS`, because the trait has compiled IDFA out of the binary and the request has to say so. +There are 30 `#if` in the package, and each belongs to one of five kinds. **Compilation boundary**, 7 — a native symbol exists only there: the `_Adapty` and `_AdaptyCallbackAction` aliases, everything under `Plugins/iOS` and `Plugins/Android`, the Kids Mode post-processor. **Wire contract**, 14 — the contract itself differs: a `[DataMember]` the schema marks platform-only (`is_family_shareable` on both product responses, `pricing_terms` read and handed back on iOS alone), a key the schema requires on one platform only (`currency_code` and `localized_string` of a price on iOS), `offer_tags` read on Android alone, the offer id required on one more branch there. **Public API behaviour**, 6 — the iOS-only methods that on an Android device report `null`, meaning success, `GetPendingStoreMessageTypes`, which reports a null list there, the filter `ShowStoreMessages` sends on iOS alone, because the Android bridge takes no filter, and the JWS `ReportTransaction` sends on iOS alone, because there is no StoreKit transaction on Android. Their guard is `UNITY_IOS || UNITY_EDITOR` rather than `UNITY_IOS && !UNITY_EDITOR`, so the Editor reaches the no-op bridge like every other method instead of taking that branch; `TransportTests` cases pin it. **Where a file actually is**, 2 — a `StreamingAssets` path is a different location on each platform, and the two places that resolve one do **not** agree about the Editor. `AdaptyCustomAssetPath.Resolve` has an `#else` and hands the path back unchanged. `Adapty.SetFallback` has none, so in the Editor it sends no `path` key at all — `transport-set-fallback.editor.approved.txt` is the whole request, `{"method": "set_fallback"}`. Nothing is lost by that: the Editor call reaches the no-op bridge and comes back with the not-supported error, having never needed a path. It is not an omission to repair. **The Kids Mode define**, 1 — `AdaptyConfiguration` forces `apple_idfa_collection_disabled` under `ADAPTY_KIDS_MODE && UNITY_IOS`, because the trait has compiled IDFA out of the binary and the request has to say so. The last two kinds are not platform questions the layer above could have answered, which is why they are here rather than folded away. Nothing else qualifies. A constructor must not re-decide by define what the layer above already decided: `AdaptySubscriptionOffer` used to null `OfferTags` off Android although its only caller, the converter, passes null there anyway — the approved snapshots did not move when it went, which is what redundant means. diff --git a/Packages/com.adapty.unity-sdk/CHANGELOG.md b/Packages/com.adapty.unity-sdk/CHANGELOG.md index a253820a..f752b398 100644 --- a/Packages/com.adapty.unity-sdk/CHANGELOG.md +++ b/Packages/com.adapty.unity-sdk/CHANGELOG.md @@ -42,9 +42,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Android. On iOS all of it needs iOS 16+. - [iOS] `AdaptyErrorCode.BillingPlanUnavailable` (1060), `OperationInProgress` (3201) and `ResolverFailure` (3202). -- [iOS] `Adapty.ReportTransaction` takes an optional `appleJWSTransaction`: in Observer mode, - pass the JWS of the reported StoreKit 2 transaction when your purchase library provides it. It - is sent as is and not sent on Android. +- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in + Observer mode, pass the JWS of the reported StoreKit 2 transaction when your purchase library + provides it, with a null `variationId` when there is none. It is sent as is, an empty string + is not sent, and nothing is sent on Android. ### Changed diff --git a/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs b/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs index 92908e44..a749f693 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Adapty.Overloads.cs @@ -66,7 +66,7 @@ Action completionHandler /// After doing this, you'll be able to see metrics in the Adapty Dashboard. /// Read more at Adapty Documentation /// - /// A string identifier of your purchased transaction. For iOS, use the transaction identifier from SKPaymentTransaction. For Android, use the order ID from the purchase object (`purchase.getOrderId()`). + /// A string identifier of your purchased transaction. For iOS, use the identifier of the StoreKit transaction: SKPaymentTransaction (StoreKit 1) or Transaction (StoreKit 2). For Android, use the order ID from the purchase object (`purchase.getOrderId()`). /// The action that will be called with the result. public static void ReportTransaction( string transactionId, @@ -79,8 +79,8 @@ Action completionHandler /// /// See . /// - /// A string identifier of your purchased transaction. - /// An optional string identifier of the variation. + /// A string identifier of your purchased transaction. For iOS, use the identifier of the StoreKit transaction: SKPaymentTransaction (StoreKit 1) or Transaction (StoreKit 2). For Android, use the order ID from the purchase object (`purchase.getOrderId()`). + /// An optional string identifier of the variation. You can get it using the property of . /// The action that will be called with the result. public static void ReportTransaction( string transactionId, diff --git a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs index 84ca1cb6..b6208abe 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs @@ -686,9 +686,9 @@ Action completionHandler /// After doing this, you'll be able to see metrics in the Adapty Dashboard. /// Read more at Adapty Documentation /// - /// A string identifier of your purchased transaction. For iOS, use the transaction identifier from SKPaymentTransaction. For Android, use the order ID from the purchase object (`purchase.getOrderId()`). + /// A string identifier of your purchased transaction. For iOS, use the identifier of the StoreKit transaction: SKPaymentTransaction (StoreKit 1) or Transaction (StoreKit 2). For Android, use the order ID from the purchase object (`purchase.getOrderId()`). /// An optional string identifier of the variation. You can get it using the property of . - /// iOS only. The JWS (`VerificationResult.jwsRepresentation`) of the same StoreKit 2 transaction as , when your purchase library provides it. Sent as is; not sent on Android. + /// iOS only. The JWS (`VerificationResult.jwsRepresentation`) of the StoreKit 2 transaction identifies, when your purchase library provides it; to pass it without a variation, pass null as . Sent as is, except that an empty string is not sent; not sent on Android. /// The action that will be called with the result. public static void ReportTransaction( string transactionId, @@ -704,7 +704,7 @@ Action completionHandler parameters["variation_id"] = variationId; } #if UNITY_IOS || UNITY_EDITOR - if (appleJWSTransaction != null) + if (!string.IsNullOrEmpty(appleJWSTransaction)) { parameters["apple_jws_transaction"] = appleJWSTransaction; } diff --git a/Packages/com.adapty.unity-sdk/package.json b/Packages/com.adapty.unity-sdk/package.json index d9d11441..54a7f9d8 100644 --- a/Packages/com.adapty.unity-sdk/package.json +++ b/Packages/com.adapty.unity-sdk/package.json @@ -5,7 +5,7 @@ "description": "Unity SDK for Adapty in-app purchases, subscriptions, paywalls, and onboarding flows.", "unity": "6000.0", "_upm": { - "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction` takes an optional `appleJWSTransaction`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point." + "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point." }, "dependencies": { "com.unity.nuget.newtonsoft-json": "3.2.2" diff --git a/tests/AdaptySDK.NextTests/TransportTests.cs b/tests/AdaptySDK.NextTests/TransportTests.cs index 1a3bb7f5..857283d4 100644 --- a/tests/AdaptySDK.NextTests/TransportTests.cs +++ b/tests/AdaptySDK.NextTests/TransportTests.cs @@ -355,6 +355,11 @@ TestCaseData Case(string name, string method, Action send) => "report_transaction", () => Adapty.ReportTransaction("txn-1", null, "header.payload.signature", _ => { }) ); + yield return Case( + "report-transaction-jws-empty", + "report_transaction", + () => Adapty.ReportTransaction("txn-1", null, "", _ => { }) + ); yield return Case( "restore-purchases", "restore_purchases", diff --git a/tests/shared/Fixtures/approved/transport-report-transaction-jws-empty.editor.approved.txt b/tests/shared/Fixtures/approved/transport-report-transaction-jws-empty.editor.approved.txt new file mode 100644 index 00000000..6acbc9f0 --- /dev/null +++ b/tests/shared/Fixtures/approved/transport-report-transaction-jws-empty.editor.approved.txt @@ -0,0 +1,4 @@ +{ + "method": "report_transaction", + "transaction_id": "txn-1" +} From e53a45faf6427003b92b56f5d2c54639ac05d368 Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Mon, 9 Nov 2026 20:04:01 +0100 Subject: [PATCH 06/11] fix: remove Adapty.GetLogLevel, which Android never implemented get_log_level is implemented by the iOS plugin only: the Android crossplatform helper has no such operation, so on Android the call never returned a level. No other Adapty cross-platform SDK exposes it - React Native, Capacitor and JS Core list it as internal - and the level is the one the app set in the configuration or with SetLogLevel. Breaking: listed under Breaking Changes in 4.3.0. --- Packages/com.adapty.unity-sdk/CHANGELOG.md | 3 +++ Packages/com.adapty.unity-sdk/Runtime/Adapty.cs | 9 --------- Packages/com.adapty.unity-sdk/package.json | 2 +- .../approved/public-surface.android.approved.txt | 1 - .../Fixtures/approved/public-surface.editor.approved.txt | 1 - .../Fixtures/approved/public-surface.ios.approved.txt | 1 - 6 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Packages/com.adapty.unity-sdk/CHANGELOG.md b/Packages/com.adapty.unity-sdk/CHANGELOG.md index f752b398..8ca0d754 100644 --- a/Packages/com.adapty.unity-sdk/CHANGELOG.md +++ b/Packages/com.adapty.unity-sdk/CHANGELOG.md @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 its Editor-side mock UI; projects on 2022.3 stay on 4.1.x. The `.unitypackage` install path — import into a clean project, `Adapty SDK > Install Dependencies`, compile — was verified on 6000.0.74f1. +- **Removed `Adapty.GetLogLevel`.** The native Android SDK has no such operation, so on Android it + never returned a level, and no other Adapty cross-platform SDK exposes it. The level is the one + the app sets: `AdaptyConfiguration.Builder.LogLevel` or `Adapty.SetLogLevel`. ### Added diff --git a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs index b6208abe..f247f35e 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs +++ b/Packages/com.adapty.unity-sdk/Runtime/Adapty.cs @@ -312,15 +312,6 @@ public static void IsActivated(Action completionHandler) AdaptyRequest.Send("is_activated", null, completionHandler); } - /// - /// Returns the current log level of the Adapty SDK. - /// - /// The action that will be called with the result. The result contains the current value. - public static void GetLogLevel(Action completionHandler) - { - AdaptyRequest.Send("get_log_level", null, completionHandler); - } - /// /// Sets the log level for the Adapty SDK. /// diff --git a/Packages/com.adapty.unity-sdk/package.json b/Packages/com.adapty.unity-sdk/package.json index 54a7f9d8..be1830f0 100644 --- a/Packages/com.adapty.unity-sdk/package.json +++ b/Packages/com.adapty.unity-sdk/package.json @@ -5,7 +5,7 @@ "description": "Unity SDK for Adapty in-app purchases, subscriptions, paywalls, and onboarding flows.", "unity": "6000.0", "_upm": { - "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point." + "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n- Removed `Adapty.GetLogLevel`: Android has no such operation, and no other Adapty cross-platform SDK exposes it.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point." }, "dependencies": { "com.unity.nuget.newtonsoft-json": "3.2.2" diff --git a/tests/shared/Fixtures/approved/public-surface.android.approved.txt b/tests/shared/Fixtures/approved/public-surface.android.approved.txt index 7ec9673b..7e443d35 100644 --- a/tests/shared/Fixtures/approved/public-surface.android.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.android.approved.txt @@ -535,7 +535,6 @@ public static AdaptySDK.Adapty.GetFlow(System.String placementId, AdaptySDK.Adap public static AdaptySDK.Adapty.GetFlow(System.String placementId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetFlowForDefaultAudience(System.String placementId, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetFlowForDefaultAudience(System.String placementId, System.Action completionHandler) : System.Void -public static AdaptySDK.Adapty.GetLogLevel(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetNativeSDKVersion(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboarding(System.String placementId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboarding(System.String placementId, System.String locale, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Nullable loadTimeout, System.Action completionHandler) : System.Void diff --git a/tests/shared/Fixtures/approved/public-surface.editor.approved.txt b/tests/shared/Fixtures/approved/public-surface.editor.approved.txt index 7ec9673b..7e443d35 100644 --- a/tests/shared/Fixtures/approved/public-surface.editor.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.editor.approved.txt @@ -535,7 +535,6 @@ public static AdaptySDK.Adapty.GetFlow(System.String placementId, AdaptySDK.Adap public static AdaptySDK.Adapty.GetFlow(System.String placementId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetFlowForDefaultAudience(System.String placementId, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetFlowForDefaultAudience(System.String placementId, System.Action completionHandler) : System.Void -public static AdaptySDK.Adapty.GetLogLevel(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetNativeSDKVersion(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboarding(System.String placementId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboarding(System.String placementId, System.String locale, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Nullable loadTimeout, System.Action completionHandler) : System.Void diff --git a/tests/shared/Fixtures/approved/public-surface.ios.approved.txt b/tests/shared/Fixtures/approved/public-surface.ios.approved.txt index 7ec9673b..7e443d35 100644 --- a/tests/shared/Fixtures/approved/public-surface.ios.approved.txt +++ b/tests/shared/Fixtures/approved/public-surface.ios.approved.txt @@ -535,7 +535,6 @@ public static AdaptySDK.Adapty.GetFlow(System.String placementId, AdaptySDK.Adap public static AdaptySDK.Adapty.GetFlow(System.String placementId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetFlowForDefaultAudience(System.String placementId, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetFlowForDefaultAudience(System.String placementId, System.Action completionHandler) : System.Void -public static AdaptySDK.Adapty.GetLogLevel(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetNativeSDKVersion(System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboarding(System.String placementId, System.Action completionHandler) : System.Void public static AdaptySDK.Adapty.GetOnboarding(System.String placementId, System.String locale, AdaptySDK.AdaptyPlacementFetchPolicy fetchPolicy, System.Nullable loadTimeout, System.Action completionHandler) : System.Void From 40aa765d31c2d9d51da646d4542c38f3ebf20238 Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Mon, 9 Nov 2026 20:04:26 +0100 Subject: [PATCH 07/11] docs: list the off-thread flow answers in the UPM changelog --- Packages/com.adapty.unity-sdk/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.adapty.unity-sdk/package.json b/Packages/com.adapty.unity-sdk/package.json index be1830f0..be5c0f67 100644 --- a/Packages/com.adapty.unity-sdk/package.json +++ b/Packages/com.adapty.unity-sdk/package.json @@ -5,7 +5,7 @@ "description": "Unity SDK for Adapty in-app purchases, subscriptions, paywalls, and onboarding flows.", "unity": "6000.0", "_upm": { - "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n- Removed `Adapty.GetLogLevel`: Android has no such operation, and no other Adapty cross-platform SDK exposes it.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point." + "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n- Removed `Adapty.GetLogLevel`: Android has no such operation, and no other Adapty cross-platform SDK exposes it.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point.\n- [Android] A permission `respond` or an observer-mode report made off Unity's thread reaches a flow that is on screen." }, "dependencies": { "com.unity.nuget.newtonsoft-json": "3.2.2" From 46bb9698b8157ab95cc11e258224f55f159f8b1b Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Mon, 9 Nov 2026 20:55:13 +0100 Subject: [PATCH 08/11] chore: pin AdaptySDK-iOS 4.3.2 4.3.2 carries the optional JWS in reportTransaction that the 4.3.0 API already sends. Its cross_platform.yaml is the copy this repository holds, and unknownTransactionId (1030) still has no throw site, so the enum stays as it is. Checked on the simulator: the SDK reports 4.3.2 and a reported transaction's JWS reaches the validate request as "transaction". --- AGENTS.md | 2 +- Packages/com.adapty.unity-sdk/CHANGELOG.md | 2 +- .../Runtime/Editor/AdaptySDKDependencies.xml | 2 +- Packages/com.adapty.unity-sdk/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 1f3d6fd6..34ca0502 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -159,6 +159,6 @@ Steps 1, 2 and 6 are the ones a release can get wrong without anything noticing The `contract-conformance` skill compares the contract with the C# that restates it; run it whenever step 3 or step 4 moves. One key is worth naming here because a conformance run will keep reporting it: `CustomerIdentityParameters.obfuscated_profile_id` is declared in the contract, Android only, and implemented by nobody — not by this SDK, not by AdaptySDK-Android 4.3.0, and iOS has no such field at all. It was left unimplemented deliberately rather than guessed at. **Re-check it on every native bump**: the moment Android starts reading it, the Unity side has to carry it too, and that is a public API change to `AdaptyCustomerIdentity`, so it wants to land in a release that expects one. -`AdaptyErrorCode.unknownTransactionId` (1030) is the second such item, decided the same way. iOS 4.0.2 declares it, this enum does not name it, and no member is added — because nothing produces it: across the whole of `Sources/` at that tag, and again at 4.3.1, the identifier appears only in `Sources/Errors/` and `Sources/StoreKit/Errors/StoreKitManagerError.swift`, as declarations, descriptions and factory methods with no call site. A code that cannot be raised needs no constant. **Re-check on every native bump** by grepping the tag for a throw site; the day one exists, the member is owed. +`AdaptyErrorCode.unknownTransactionId` (1030) is the second such item, decided the same way. iOS 4.0.2 declares it, this enum does not name it, and no member is added — because nothing produces it: across the whole of `Sources/` at that tag, and again at 4.3.1 and 4.3.2, the identifier appears only in `Sources/Errors/` and `Sources/StoreKit/Errors/StoreKitManagerError.swift`, as declarations, descriptions and factory methods with no call site. A code that cannot be raised needs no constant. **Re-check on every native bump** by grepping the tag for a throw site; the day one exists, the member is owed. Three more are reported by every conformance run since 4.3 and are deliberate. `AdaptyProfile.Subscription.billing_plan_id` and `AdaptyPromotedProduct.purchase_intent_id` are required on iOS by the contract and read as optional: a profile or a promoted-product event that failed to decode would be lost without a trace, while a missing plan reads as null and a missing intent fails the purchase with a native error the caller sees. `StoreMessagesHandling.default` has no member, because iOS treats it as `auto` and no wrapper sends it. diff --git a/Packages/com.adapty.unity-sdk/CHANGELOG.md b/Packages/com.adapty.unity-sdk/CHANGELOG.md index 8ca0d754..a50b11a7 100644 --- a/Packages/com.adapty.unity-sdk/CHANGELOG.md +++ b/Packages/com.adapty.unity-sdk/CHANGELOG.md @@ -52,7 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- [iOS] AdaptySDK-iOS 4.3.1. +- [iOS] AdaptySDK-iOS 4.3.2. - [Android] AdaptySDK-Android 4.3.0. - [iOS] A price without `currency_code` or `localized_string` is now a decoding error, as the contract requires; iOS always sends both. diff --git a/Packages/com.adapty.unity-sdk/Runtime/Editor/AdaptySDKDependencies.xml b/Packages/com.adapty.unity-sdk/Runtime/Editor/AdaptySDKDependencies.xml index 85e1f016..732c8e23 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Editor/AdaptySDKDependencies.xml +++ b/Packages/com.adapty.unity-sdk/Runtime/Editor/AdaptySDKDependencies.xml @@ -1,6 +1,6 @@ - + diff --git a/Packages/com.adapty.unity-sdk/package.json b/Packages/com.adapty.unity-sdk/package.json index be5c0f67..8795927d 100644 --- a/Packages/com.adapty.unity-sdk/package.json +++ b/Packages/com.adapty.unity-sdk/package.json @@ -5,7 +5,7 @@ "description": "Unity SDK for Adapty in-app purchases, subscriptions, paywalls, and onboarding flows.", "unity": "6000.0", "_upm": { - "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n- Removed `Adapty.GetLogLevel`: Android has no such operation, and no other Adapty cross-platform SDK exposes it.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.1.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point.\n- [Android] A permission `respond` or an observer-mode report made off Unity's thread reaches a flow that is on screen." + "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n- Removed `Adapty.GetLogLevel`: Android has no such operation, and no other Adapty cross-platform SDK exposes it.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.2.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point.\n- [Android] A permission `respond` or an observer-mode report made off Unity's thread reaches a flow that is on screen." }, "dependencies": { "com.unity.nuget.newtonsoft-json": "3.2.2" From 15cdefbe12e6fb085474ad8716d2ac8fb7cc4e5d Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Mon, 9 Nov 2026 21:20:36 +0100 Subject: [PATCH 09/11] chore: date 4.3.0 in the changelog --- Packages/com.adapty.unity-sdk/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.adapty.unity-sdk/CHANGELOG.md b/Packages/com.adapty.unity-sdk/CHANGELOG.md index a50b11a7..e59e50a3 100644 --- a/Packages/com.adapty.unity-sdk/CHANGELOG.md +++ b/Packages/com.adapty.unity-sdk/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [4.3.0] - 2026-10-28 +## [4.3.0] - 2026-11-09 ### Breaking Changes From 6224a021b9baa811ca772a3f789412f7fa8bd3ae Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Wed, 11 Nov 2026 19:40:26 +0100 Subject: [PATCH 10/11] chore: pin AdaptySDK-Android 4.3.3 --- AGENTS.md | 2 +- Packages/com.adapty.unity-sdk/CHANGELOG.md | 4 +++- .../Android/AdaptySDKDependencies.androidlib/build.gradle | 6 +++--- Packages/com.adapty.unity-sdk/package.json | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 34ca0502..419b7a00 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -157,7 +157,7 @@ When releasing a new version, update: Steps 1, 2 and 6 are the ones a release can get wrong without anything noticing — the tag and the artifact name are both derived from `package.json`, so a forgotten `SDKVersion` ships under a correct-looking name. `PackageManifestTests` compares all three against the manifest and fails the suite instead. -The `contract-conformance` skill compares the contract with the C# that restates it; run it whenever step 3 or step 4 moves. One key is worth naming here because a conformance run will keep reporting it: `CustomerIdentityParameters.obfuscated_profile_id` is declared in the contract, Android only, and implemented by nobody — not by this SDK, not by AdaptySDK-Android 4.3.0, and iOS has no such field at all. It was left unimplemented deliberately rather than guessed at. **Re-check it on every native bump**: the moment Android starts reading it, the Unity side has to carry it too, and that is a public API change to `AdaptyCustomerIdentity`, so it wants to land in a release that expects one. +The `contract-conformance` skill compares the contract with the C# that restates it; run it whenever step 3 or step 4 moves. One key is worth naming here because a conformance run will keep reporting it: `CustomerIdentityParameters.obfuscated_profile_id` is declared in the contract, Android only, and implemented by nobody — not by this SDK, not by AdaptySDK-Android through 4.3.3 (crossplatform 4.3.1 has no such key), and iOS has no such field at all. It was left unimplemented deliberately rather than guessed at. **Re-check it on every native bump**: the moment Android starts reading it, the Unity side has to carry it too, and that is a public API change to `AdaptyCustomerIdentity`, so it wants to land in a release that expects one. `AdaptyErrorCode.unknownTransactionId` (1030) is the second such item, decided the same way. iOS 4.0.2 declares it, this enum does not name it, and no member is added — because nothing produces it: across the whole of `Sources/` at that tag, and again at 4.3.1 and 4.3.2, the identifier appears only in `Sources/Errors/` and `Sources/StoreKit/Errors/StoreKitManagerError.swift`, as declarations, descriptions and factory methods with no call site. A code that cannot be raised needs no constant. **Re-check on every native bump** by grepping the tag for a throw site; the day one exists, the member is owed. diff --git a/Packages/com.adapty.unity-sdk/CHANGELOG.md b/Packages/com.adapty.unity-sdk/CHANGELOG.md index e59e50a3..4ca1d205 100644 --- a/Packages/com.adapty.unity-sdk/CHANGELOG.md +++ b/Packages/com.adapty.unity-sdk/CHANGELOG.md @@ -53,7 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - [iOS] AdaptySDK-iOS 4.3.2. -- [Android] AdaptySDK-Android 4.3.0. +- [Android] AdaptySDK-Android 4.3.3 (android-sdk 4.3.2, android-ui 4.3.1, crossplatform 4.3.1). - [iOS] A price without `currency_code` or `localized_string` is now a decoding error, as the contract requires; iOS always sends both. - [Android] The package no longer ships a Java wrapper (`io.adapty.internal:unity-wrapper`): the @@ -72,6 +72,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Looper on Unity's thread, which GameActivity does not have. Callbacks now go through the thread's native looper, which both entry points poll, so a flow's `close` and Back also reach the listener while the flow is on screen. +- [Android] Loading a placement no longer outlasts its `loadTimeout` when the backend is slow + to answer (AdaptySDK-Android 4.3.3). - [Android] A permission `respond` or an observer-mode report made off Unity's thread while a flow is on screen reaches the flow at once; it used to wait for the flow to close. diff --git a/Packages/com.adapty.unity-sdk/Runtime/Plugins/Android/AdaptySDKDependencies.androidlib/build.gradle b/Packages/com.adapty.unity-sdk/Runtime/Plugins/Android/AdaptySDKDependencies.androidlib/build.gradle index 1434895d..4604b0ec 100644 --- a/Packages/com.adapty.unity-sdk/Runtime/Plugins/Android/AdaptySDKDependencies.androidlib/build.gradle +++ b/Packages/com.adapty.unity-sdk/Runtime/Plugins/Android/AdaptySDKDependencies.androidlib/build.gradle @@ -3,9 +3,9 @@ apply plugin: 'com.android.library' def unityLibraryAndroid = project(':unityLibrary').android dependencies { - api 'io.adapty.internal:crossplatform:4.3.0' - api 'io.adapty:android-sdk:4.3.0' - api 'io.adapty:android-ui:4.3.0' + api 'io.adapty.internal:crossplatform:4.3.1' + api 'io.adapty:android-sdk:4.3.2' + api 'io.adapty:android-ui:4.3.1' } android { diff --git a/Packages/com.adapty.unity-sdk/package.json b/Packages/com.adapty.unity-sdk/package.json index 8795927d..e8f33cea 100644 --- a/Packages/com.adapty.unity-sdk/package.json +++ b/Packages/com.adapty.unity-sdk/package.json @@ -5,7 +5,7 @@ "description": "Unity SDK for Adapty in-app purchases, subscriptions, paywalls, and onboarding flows.", "unity": "6000.0", "_upm": { - "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n- Removed `Adapty.GetLogLevel`: Android has no such operation, and no other Adapty cross-platform SDK exposes it.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.2.\n- [Android] AdaptySDK-Android 4.3.0.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point.\n- [Android] A permission `respond` or an observer-mode report made off Unity's thread reaches a flow that is on screen." + "changelog": "### Breaking Changes\n\n- The minimum supported Unity version is raised from 2022.3 to 6.0 (6000.0); projects on 2022.3 stay on 4.1.x.\n- Removed `Adapty.GetLogLevel`: Android has no such operation, and no other Adapty cross-platform SDK exposes it.\n\n### Added\n\n- [iOS] Commitment subscriptions: `AdaptySubscription.PricingTerms` carries the billing plan, each payment and the commitment, and `MakePurchase` buys on the plan offered. Needs iOS 26.4+ and Xcode 26.5+; elsewhere a product is bought up front.\n- `BillingPlan` and `CommitmentInfo` on `AdaptyProfile.AccessLevel` and `AdaptyProfile.Subscription`.\n- `AdaptyFlow.VariationName`.\n- Kept flow views: `DismissFlowView(view, destroy: false, ...)`, `Present` again, `DestroyFlowView`.\n- `Adapty.PreloadFlows` and `Adapty.PreloadFlowsForDefaultAudience`.\n- Held store messages: `AdaptyStoreMessagesHandling.Manual`, `Adapty.ShowStoreMessages`, and on iOS `Adapty.GetPendingStoreMessageTypes`.\n- [iOS] `AdaptyErrorCode.BillingPlanUnavailable`, `OperationInProgress` and `ResolverFailure`.\n- [iOS] `Adapty.ReportTransaction(transactionId, variationId, appleJWSTransaction, ...)`: in Observer mode, pass the JWS of the StoreKit 2 transaction.\n\n### Changed\n\n- [iOS] AdaptySDK-iOS 4.3.2.\n- [Android] AdaptySDK-Android 4.3.3.\n- [iOS] A price without `currency_code` or `localized_string` is a decoding error.\n- [Android] No Java wrapper: the bridge calls `io.adapty.internal:crossplatform` directly.\n\n### Fixed\n\n- [Android] Completion handlers and events reach C# with GameActivity as the entry point.\n- [Android] Loading a placement no longer outlasts its `loadTimeout` when the backend is slow.\n- [Android] A permission `respond` or an observer-mode report made off Unity's thread reaches a flow that is on screen." }, "dependencies": { "com.unity.nuget.newtonsoft-json": "3.2.2" From 0ef1c3a0209c3ea459897111e22a3613ea227194 Mon Sep 17 00:00:00 2001 From: Yauch Dev <275063651+yauch-dev@users.noreply.github.com> Date: Wed, 11 Nov 2026 22:58:49 +0100 Subject: [PATCH 11/11] test: local StoreKit products for the consumable, lifetime and pay-up-front cases --- Assets/SdkHarness/AGENTS.md | 2 + Assets/SdkHarness/AdaptyDemo.storekit | 112 +++++++++++++++++++++++++- 2 files changed, 113 insertions(+), 1 deletion(-) diff --git a/Assets/SdkHarness/AGENTS.md b/Assets/SdkHarness/AGENTS.md index 7b09c64c..852af044 100644 --- a/Assets/SdkHarness/AGENTS.md +++ b/Assets/SdkHarness/AGENTS.md @@ -25,6 +25,8 @@ unity command harness_call --runtime-path "$APP" --method GetFlow --args '{"plac Open the **workspace**: External Dependency Manager writes a Podfile, and the bare `.xcodeproj` fails at link with `framework 'Pods_UnityFramework' not found`. Xcode runs it, not `xcodebuild`, because of purchases: `harness_build` files `Assets/SdkHarness/AdaptyDemo.storekit` in the project (as `text`, with no target membership — Xcode offers nothing else as a configuration) and selects it in the scheme's Run options, and Xcode syncs that configuration into the simulator through its Instruments service when it launches the app, so `storekitd` serves the products locally and `MakePurchase` raises Xcode's confirmation sheet instead of the Apple Account sign-in. Nothing else performs that sync: `xcodebuild` (build or test) ignores the scheme option, and an `SKTestSession` opened from the app, or from an `xcodebuild test` host, is refused by `storekitd` as not entitled. Xcode names its destination by device and runtime (`iPhone 17 Pro (26.5)`) and boots that simulator even when another one is up, so address the device by UDID (`xcrun simctl list devices`) rather than `booted`. The sheet and the "You're all set" alert after it take a tap each; the `ios-storekit-purchase` skill (`.claude/skills/ios-storekit-purchase/`) says which log line means which window is up and where its button is, so a purchase needs no screenshot. On the harness that is: `harness_activate`, `GetFlow` and `GetPaywallProducts` first, then `harness_call --method MakePurchase --args '{"product":"$GetPaywallProducts[0]"}' --timeout_ms 90000` in the background — it returns only after the alert's OK — and `GetProfile` to see the access level. The descriptor with the port and token appears next to the app's `Data/` once the server is up, which makes its existence the readiness signal. +`AdaptyDemo.storekit` carries the Demo App's iOS products that the test placements reference: in group `premium` the `weekly`/`monthly`/`yearly.premium.*`, `monthly.trial.premium.999` (free-trial intros) and `sixmonth.premium.999`; `consumable_apples_99` and `unlimited.9999` (`rt.2pr.consum`); and `threemonth.premium.99` with a pay-up-front intro ($0.49 for a month) in a group of its own, `offers`, because intro eligibility is per group and `premium`'s is spent on a simulator that has bought from it. Local StoreKit reports that phase's `price.amount` as 0 next to `localized_string` "$0.49"; the iOS SDK passes `offer.price` through as StoreKit gives it. + ## Commitment billing plans `AdaptyDemo.storekit` carries one product on a commitment plan: `yearly.commitment.6999`, in a group of its own, billed up front at 69.99 or monthly at 6.99 over a 12-month commitment (83.88). No placement offers it, so a run builds the flow by hand: take `GetFlow`'s result, set `variations[0].products[0].vendor_product_id` to `yearly.commitment.6999` and its `pricing_terms` to `[{"billing_plan_id":"monthly"}]`, and pass that JSON as `GetPaywallProducts {"flow": …}` — a flow, unlike a product, has a JSON reader. `MakePurchase` with the result raises the commitment sheet ("$6.99 per month, 12-month commitment"), and the access level in the purchase result carries `billing_plan_id: "monthly"` and `commitment` 1 of 12. Renewals are not observable this way: iOS maps a renewed transaction to an access level through the backend's product list, which has no such product. diff --git a/Assets/SdkHarness/AdaptyDemo.storekit b/Assets/SdkHarness/AdaptyDemo.storekit index d08e6266..dc997e98 100644 --- a/Assets/SdkHarness/AdaptyDemo.storekit +++ b/Assets/SdkHarness/AdaptyDemo.storekit @@ -1,7 +1,38 @@ { "identifier": "AD2E4CA1-E1C6-4DD5-92EC-ADB9D3D6524E", "nonRenewingSubscriptions": [], - "products": [], + "products": [ + { + "displayPrice": "0.99", + "familyShareable": false, + "internalID": "F5EE1D3B-64C0-48E2-9EF9-182F38C33D94", + "localizations": [ + { + "description": "Consumable Apples 99", + "displayName": "Consumable Apples 99", + "locale": "en_US" + } + ], + "productID": "consumable_apples_99", + "referenceName": "Consumable Apples 99", + "type": "Consumable" + }, + { + "displayPrice": "99.99", + "familyShareable": false, + "internalID": "29D10D2B-33A0-48F6-807A-66CD2879DBD4", + "localizations": [ + { + "description": "Lifetime Premium", + "displayName": "Lifetime Premium", + "locale": "en_US" + } + ], + "productID": "unlimited.9999", + "referenceName": "Lifetime Premium", + "type": "NonConsumable" + } + ], "settings": { "_failTransactionsEnabled": false, "_askToBuyEnabled": false @@ -86,6 +117,85 @@ "referenceName": "1 Year Premium", "subscriptionGroupID": "7DD53B64-E911-4C1C-AC72-E7604A7AADAF", "type": "RecurringSubscription" + }, + { + "adHocOffers": [], + "codeOffers": [], + "displayPrice": "9.99", + "familyShareable": false, + "groupNumber": 2, + "internalID": "4A07A040-E874-47AB-9951-ED4033AA2ECA", + "localizations": [ + { + "description": "1 Month Premium (trial)", + "displayName": "1 Month Premium (trial)", + "locale": "en_US" + } + ], + "productID": "monthly.trial.premium.999", + "recurringSubscriptionPeriod": "P1M", + "referenceName": "1 Month Premium (trial)", + "subscriptionGroupID": "7DD53B64-E911-4C1C-AC72-E7604A7AADAF", + "type": "RecurringSubscription", + "introductoryOffer": { + "paymentMode": "free", + "subscriptionPeriod": "P1W", + "internalID": "D27E8736-8352-400D-B861-A4C3117F8796" + } + }, + { + "adHocOffers": [], + "codeOffers": [], + "displayPrice": "9.99", + "familyShareable": false, + "groupNumber": 3, + "internalID": "59FE2058-50CD-490F-9950-9226676964D7", + "localizations": [ + { + "description": "6 Months Premium", + "displayName": "6 Months Premium", + "locale": "en_US" + } + ], + "productID": "sixmonth.premium.999", + "recurringSubscriptionPeriod": "P6M", + "referenceName": "6 Months Premium", + "subscriptionGroupID": "7DD53B64-E911-4C1C-AC72-E7604A7AADAF", + "type": "RecurringSubscription" + } + ] + }, + { + "id": "41450A6F-5FF7-43F6-89CC-F2229E10B82C", + "localizations": [], + "name": "offers", + "subscriptions": [ + { + "adHocOffers": [], + "codeOffers": [], + "displayPrice": "0.99", + "familyShareable": false, + "groupNumber": 1, + "internalID": "4DE757FE-6936-414B-957C-0D8806F2E2B1", + "localizations": [ + { + "description": "3 Months Premium", + "displayName": "3 Months Premium", + "locale": "en_US" + } + ], + "productID": "threemonth.premium.99", + "recurringSubscriptionPeriod": "P3M", + "referenceName": "3 Months Premium", + "subscriptionGroupID": "41450A6F-5FF7-43F6-89CC-F2229E10B82C", + "type": "RecurringSubscription", + "introductoryOffer": { + "displayPrice": "0.49", + "numberOfPeriods": 1, + "paymentMode": "payUpFront", + "subscriptionPeriod": "P1M", + "internalID": "7C604A0C-3FBB-482D-AA45-DC61991B3B80" + } } ] },