Built for iOS, from the first line
One Swift package for purchases, access, paywall values and events. Xee checks every purchase with Apple on the server, so access is right on every device a user signs in on.
Four steps
From package to first purchase
Each step is one page in the docs, in this order.
-
Add the package and activate
Add
Install & configureXeeSDK-iOSwith Swift Package Manager and activate it once, as early in launch as you can.import Xee Task { do { try await Xee.activate(withAPIKey: "xee_YOUR_SDK_KEY") } catch { // error is a XeeError: log it and keep the app usable } }
-
Load a paywall and its values
Ask for a paywall by its ID. You get its text, prices and products, or your own defaults when offline.
Get a paywalllet paywall = try await Xee.getPaywallVariant(paywallId: "main") // Read the values and products from `paywall`.
-
Make a purchase
One call opens the App Store sheet. Xee checks the purchase with Apple and turns on access.
Make purchaseslet result = try await Xee.makePurchase(product: product) switch result { case .userCancelled: break // leave the paywall open default: dismiss() }
-
Check access
Xee has one access level,
Check subscription statuspremium. A missing entry means no access.let profile = try await Xee.getProfile() if profile.accessLevels["premium"]?.isActive ?? false { // unlock paid features }
What the SDK takes care of
Purchases checked by Apple
Every purchase is verified on the server and kept in step with Apple's notifications: renewals, refunds and billing issues.
Users across devices
Identify a user with your own ID and their access follows them to every device they sign in on.
The device's language
Paywall and view values arrive in the device's language, from the languages you choose.
Works offline
A fallback file ships in your app, so a paywall always shows, even before the first network call.
Your own events
Xee.track sends the steps of a flow, so a view test can be judged by any event you choose.
Fair test splits
The server gives each user one arm of a test and keeps it, on every device and after reinstalls.
Ready to grow for free
Every agent comes standard, and it is free until your app makes $5K a month.