|
AdaptySDK 4.1.1
|

Adapty Unity SDK is a native wrapper around Adapty iOS SDK and Adapty Android SDK. Both SDKs are written in pure Swift/Kotlin, all wrapped into a C# lib.
Requires Unity 2022.3 or newer and Android API 21 or newer. iOS builds require Xcode 26 or newer and a deployment target of 15.0 or newer: AdaptySDK-iOS 4.x is a swift-tools-version: 6.2 package, 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.
Adapty handles everything, from free trials to refunds, in a simple, developer-friendly SDK.

With the Adapty Flow Builder, you can visually design complete user experiences — from single-screen paywalls to multi-step onboardings, surveys, and quizzes.
Adapty automatically renders your flow and handles all the complex purchase logic, receipt validation, and subscription management behind the scenes.


Ask questions, participate in discussions about Adapty-related topics, become a part of our community for app developers and marketers. Learn how to monetize your app, ask questions, post jobs, read industry news and analytics. Ad free.
Follow our quickstart guide to install and configure Adapty SDK. Set up purchases in hours instead of weeks 🚀
v4 works in flows. Paywalls and onboardings are both fetched with Adapty.GetFlow and shown with AdaptyUI.CreateFlowView, whether you built them in the Paywall Builder or the new Flow Builder. The separate onboarding API of v3 still works but is deprecated and warns at compile time, so start new integrations on flows.
Installing with Package Manager: Add package from git URL, with the path suffix — the package does not sit at the repository root — and the version suffix, which pins the tag:
Drop #4.1.1 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.
The SDK depends on com.unity.nuget.newtonsoft-json, which Package Manager installs for you and which every platform needs — the SDK assembly is gated on it. It also depends on External Dependency Manager, but only for iOS, where it resolves the Swift package; Android never goes through it, since its dependencies ship in a bundled .androidlib that Unity adds to the Gradle build itself. Neither dependency can arrive with a .unitypackage, which carries assets only.
Installing from a .unitypackage: take the latest from Releases, and add com.unity.nuget.newtonsoft-json before importing. Until it is there the SDK assembly is skipped by a define constraint, so your calls into Adapty will not compile. Adapty SDK > Install Dependencies is what fixes that, and it lives in an Editor assembly carrying no such constraint — so it is available as long as the rest of your scripts still compile. Once they do not, because they are the code calling Adapty, Unity stops loading Editor assemblies and Newtonsoft has to come from Package Manager by hand. With Newtonsoft in place, that menu item adds whatever else is missing, including the OpenUPM scoped registry External Dependency Manager is published on.
Upgrading from 3.x: delete Assets/AdaptySDK before importing. A .unitypackage never removes files, and 4.0 drops 62 sources that 3.x shipped — the whole JSON/ folder among them. Left where they are, they compile into the same assembly as the new ones: 35 of them redeclare a type 4.0 also declares, and the rest reference types it no longer has. Either way the SDK does not compile, and because the assembly is gated on Newtonsoft the errors appear only once Newtonsoft is installed.
It also upgrades an External Dependency Manager older than the SDK needs — but only one installed as a package. A copy imported from Google's own .unitypackage under Assets/ has no version Package Manager can read, so the menu item leaves it alone and warns instead; update that one yourself.
Upgrading? MIGRATION-v3.17-to-v4.1.md takes a 3.x project straight to 4.1 — the renamed paywall and attribution APIs, the new Newtonsoft.Json dependency, the order to install things in, and the fallback files the 4.1 natives expect you to re-download.
Read the release notes and known issues before you integrate: they carry the limitations of the pinned native SDKs, which no amount of configuration on your side will work around.
Apps in the App Store Kids Category must not link the advertising identifier. Add the ADAPTY_KIDS_MODE scripting define to build such an app:
Swift package traits need Xcode 26 or newer, which is already the floor for v4 on iOS — Kids Mode adds no requirement of its own.
Set the define in Player Settings > Other Settings > Scripting Define Symbols. The build step that enables the trait lives in an Editor assembly, and Player Settings is what Editor assemblies are compiled with.
A build profile's scripting defines also work, but only once Unity has recompiled the Editor assemblies for them. Switching build profiles and building in the same session — especially from a script — can run the build against Editor assemblies compiled for the previous profile, in which case the trait is silently not applied while the runtime still reports Kids Mode. The SDK fails the iOS build when it detects that state, so it cannot ship. Setting the define in Player Settings and letting the Editor recompile before building avoids the situation entirely.
BuildPlayerOptions.extraScriptingDefines never works for this define: it reaches the player assemblies only, and it is invisible to every Editor API, so the mismatch cannot be detected either.
So do we! Feel free to star the repo ⭐️⭐️⭐️ and make our developers happy!
Adapty is available under the MIT license. Click here for details.