4.1.0
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: deleteAssets/AdaptySDKand addcom.unity.nuget.newtonsoft-jsonfirst. A.unitypackagenever 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.
AdaptyPaywall→AdaptyFlow,GetPaywall→GetFlow,CreatePaywallView→CreateFlowView, with the corresponding models, events and view controllers. Event listener interfaces carry anIprefix:IAdaptyEventListener,IAdaptyFlowsEventsListener,IAdaptyUISystemRequestsHandler,IAdaptyUIObserverModeResolver,IAdaptyOnboardingsEventsListener. Adapty.UpdateAttributionis nowAdapty.UpdateExternalAttribution, taking a typedAdaptyExternalAttributionProviderinstead of a string source.AdaptyProfile.AppliedAttributionSourcesbecomesAppliedExternalAttributionProviders.- Adapty Attribution is opt-in, and installation details come with it.
OnInstallationDetailsSuccessstops firing andGetCurrentInstallationStatusstops reportingDetermineduntil the app activates withAdaptyConfiguration.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.SimpleJSONnamespace and its public types are gone. IAdaptyEventListenergainedOnReceivePromotedPurchase(AdaptyPromotedProduct)— implementations must add the method.Adapty.GetLoglevelis spelledAdapty.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,AdaptyInstallationStatusis one type with aStatusandDetailsinstead of three subclasses, theUnknownmembers of six enums are gone along with the silent fallback that produced them, and theInvalidJson(23) andPendingPurchase(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
.unitypackagecarries assets only and can bring neither. - iOS Kids Mode for the App Store Kids Category / COPPA. The
ADAPTY_KIDS_MODEscripting define compiles IDFA, AdSupport and AppTrackingTransparency out of the iOS binary and forcesapple_idfa_collection_disabled. Set it in Player Settings; see the README. Adapty.MakePromotedPurchaseandIAdaptyEventListener.OnReceivePromotedPurchase— App Store promoted in-app purchases (iOS only).AdaptyUICreateFlowViewParameters.Locale— the localization to render a flow with, andAdaptyUIFlowView.Localefor the one it was built with.AdaptyFlow.HasViewConfiguration— whether a flow can be rendered, without callingCreateFlowViewand 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 —
Activateincluded — 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.SetBirthdaysends the padded date the contract asks for; 7 March 1990 went out as1990-3-7. Every birthday below the tenth of a month was affected, on every platform, since 3.x.UpdateAttributionsendsboolandDateTimevalues instead of dropping them.AdaptyProductIdentifiercompares by value, so identifiers built from a flow work as keys inSetProductPurchaseParameters— they used to compare by reference and the parameters silently applied to nothing.ReportTransactionno longer reportsDecodingFailedfor a transaction that was in fact reported.AdaptyPurchaseResult.ToString()no longer throws on a pending or cancelled purchase, andAdaptyPlacementFetchPolicy.Defaultis no longer null when passed explicitly.AdaptyFlow.VendorProductIdsandProductIdentifiersno 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, integrationkeyorprovider— is reported asWrongParam(3001) through the completion handler instead of throwing at the call site. - [Android]
RestorePurchasesno longer reportsNoPurchasesToRestorewhen 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