Skip to content

4.1.0

Choose a tag to compare

@x401om x401om released this 26 Aug 13:21

Adapty Unity SDK 4.1.0 is the first stable release of the 4.x line. Everything 4.0 prepared ships here, together with the 4.1 natives.

The headline is Flow, which replaces the Paywall as the unit of presentation and analytics: a natively rendered experience that can hold several screens — onboardings, surveys, quizzes, single- or multi-step paywalls. Paywalls built in the no-code builder keep working.

This is a major upgrade with no deprecated aliases: expect compile errors, and work through them with the guide.

👉 See the migration guide before you start.

📋 Before you upgrade

  • Installing from .unitypackage: delete Assets/AdaptySDK and add com.unity.nuget.newtonsoft-json first. A .unitypackage never removes files, so the 62 sources this release drops would stay behind and collide with the new ones. Package Manager users get the dependency automatically.
  • iOS builds now require Xcode 26 or newer. AdaptySDK-iOS 4.x declares swift-tools-version: 6.2, and Swift Package Manager refuses a package newer than the toolchain. Nothing in Unity can check this.
  • Unity 2022.3 is now the declared minimum.

⚠️ Breaking

  • Paywall entities are now Flow. AdaptyPaywallAdaptyFlow, GetPaywallGetFlow, CreatePaywallViewCreateFlowView, with the corresponding models, events and view controllers. Event listener interfaces carry an I prefix: IAdaptyEventListener, IAdaptyFlowsEventsListener, IAdaptyUISystemRequestsHandler, IAdaptyUIObserverModeResolver, IAdaptyOnboardingsEventsListener.
  • Adapty.UpdateAttribution is now Adapty.UpdateExternalAttribution, taking a typed AdaptyExternalAttributionProvider instead of a string source. AdaptyProfile.AppliedAttributionSources becomes AppliedExternalAttributionProviders.
  • Adapty Attribution is opt-in, and installation details come with it. OnInstallationDetailsSuccess stops firing and GetCurrentInstallationStatus stops reporting Determined until the app activates with AdaptyConfiguration.Builder.SetAdaptyAttributionEnabled(true). Nothing in the API changes shape — the data simply stops arriving.
  • Re-download your fallback files. 4.1 reads format 11 and rejects the format 10 files v3 shipped against, on both platforms.
  • The JSON layer is Newtonsoft.Json instead of the bundled SimpleJSON. Models, members and signatures are unchanged, so calling code is unaffected — but the AdaptySDK.SimpleJSON namespace and its public types are gone.
  • IAdaptyEventListener gained OnReceivePromotedPurchase(AdaptyPromotedProduct) — implementations must add the method.
  • Adapty.GetLoglevel is spelled Adapty.GetLogLevel.
  • Response models hand back read-only collections, and the parameter objects copy the dictionaries you pass them, so writing to your own copy afterwards no longer changes what the view was built with.
  • The public surface is tightened: every concrete class is sealed, AdaptyInstallationStatus is one type with a Status and Details instead of three subclasses, the Unknown members of six enums are gone along with the silent fallback that produced them, and the InvalidJson (23) and PendingPurchase (25) error codes are removed because neither native SDK can raise them. The guide lists each one.
  • The legacy onboarding API is deprecated in full and warns at compile time wherever it is named, not only at its entry points. Build onboardings as flows.

✨ Added

  • Adapty SDK > Install Dependencies — installs whichever package dependencies are missing: Newtonsoft.Json, and External Dependency Manager with the OpenUPM registry it lives on. A .unitypackage carries assets only and can bring neither.
  • iOS Kids Mode for the App Store Kids Category / COPPA. The ADAPTY_KIDS_MODE scripting define compiles IDFA, AdSupport and AppTrackingTransparency out of the iOS binary and forces apple_idfa_collection_disabled. Set it in Player Settings; see the README.
  • Adapty.MakePromotedPurchase and IAdaptyEventListener.OnReceivePromotedPurchase — App Store promoted in-app purchases (iOS only).
  • AdaptyUICreateFlowViewParameters.Locale — the localization to render a flow with, and AdaptyUIFlowView.Locale for the one it was built with.
  • AdaptyFlow.HasViewConfiguration — whether a flow can be rendered, without calling CreateFlowView and reading the error.
  • AdaptyUICreateFlowViewParameters.EnableSafeAreaPaddings (Android only).
  • AdaptyConfiguration.Builder.SetAdaptyAttributionEnabled(bool).

🐛 Fixed

  • Requests call back even when the app never sets an event listener. The callback bridge was registered by the listener setters and by nothing else, so an app that subscribes to no events got no completion handler called at all — Activate included — on either platform. Present since 3.x.
  • Registered listeners no longer survive Play Mode. With Domain Reload disabled, a previous run's listeners were still registered for the next one and received its events.
  • AdaptyProfileParameters.SetBirthday sends the padded date the contract asks for; 7 March 1990 went out as 1990-3-7. Every birthday below the tenth of a month was affected, on every platform, since 3.x.
  • UpdateAttribution sends bool and DateTime values instead of dropping them.
  • AdaptyProductIdentifier compares by value, so identifiers built from a flow work as keys in SetProductPurchaseParameters — they used to compare by reference and the parameters silently applied to nothing.
  • ReportTransaction no longer reports DecodingFailed for a transaction that was in fact reported.
  • AdaptyPurchaseResult.ToString() no longer throws on a pending or cancelled purchase, and AdaptyPlacementFetchPolicy.Default is no longer null when passed explicitly.
  • AdaptyFlow.VendorProductIds and ProductIdentifiers no longer return duplicates across paywall variations.
  • Custom linear gradients are serialized from every color and alpha key of the Unity Gradient.
  • A wrong argument the SDK can catch before sending — a null placementId, integration key or provider — is reported as WrongParam (3001) through the completion handler instead of throwing at the call site.
  • [Android] RestorePurchases no longer reports NoPurchasesToRestore when there is nothing to restore, and an exception thrown by your completion handler is caught at the bridge boundary instead of leaving the SDK through JNI.
  • Calling the SDK in the Editor returns a readable "not supported on this platform" error instead of a null that looked like success.

📦 Installation

Unity Package Manager, Git URL:

https://github.com/adaptyteam/AdaptySDK-Unity.git?path=/Packages/com.adapty.unity-sdk#4.1.0

Native dependencies: AdaptySDK-iOS 4.1.2, AdaptySDK-Android 4.1.0, cross-platform contract 4.1.2.

Full setup: quickstart guide.

❗️ Don't forget to update your local fallback file.

Full Changelog: 3.17.0...4.1.0