Releases: qonversion/qonversion-ios-sdk
2.0.0
We have rethought our approach to working with subscriptions and prepared our largest update that includes Product Center – our major feature for working with any type in-app purchases.
2.0.0
What's new
Product Center
- Application calls the purchase method to initialize Qonversion SDK.
- Qonversion SDK communicates with StoreKit or Google Billing Client to make a purchase.
- If a purchase is successful, the SDK sends a request to Qonversion API for server-to-server validation of purchase. Qonversion server unlocks permissions associated with the product.
- SDK returns control to the application with a processing state
Purchasing
Qonversion.purchase("main") { (permissions, error, isCancelled) in
if let error = error {
self.process(error, isCancelled: isCancelled)
return
}
self.process(permissions)
}
Check permission
Qonversion.checkPermissions { (permissions, error) in
if let error = error {
// handle error
return
}
if let premium = permissions["premium"], premium.isActive {
switch premium.renewState {
case .willRenew, .nonRenewable:
// .willRenew is state for auto-renewable purchases
// .nonRenewable is state for in-app purchases that unlock the permission lifetime
break
case .billingIssue:
// Grace period: permission is active, but there was some billing issue.
// Prompt the user to update the payment method.
break
case .cancelled:
// The user canceled the subscription, but the subscription has not expired yet.
// Prompt the user to resubscribe with some special offer.
break
default: break
}
}
}
Qonversion.products { products in
self.setupProducts(products)
}
Async setting for user id
Qonversion.setUserID("your side user id")
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
User properties are attributes you can set on a user level. You can send user properties to third party platforms as well as use them in Qonversion for customer segmentation and analysis.
Qonversion.setProperty(.email, value: "[email protected]")
Additionally, you are able to add a custom user property. Qonversion can send them to third party integrations as well. For example, you could add a user details and use that data for emails or push notifications personalization in Mailchimp and OneSignal integrations.
Qonversion.setProperty("liked-app", value: "yes")
Read more in documentation
1.0.4
1.0.3
Receipt Validation
Qonversion SDK provides a method for checking user subscription status. That makes your app flow more flexible. For example, you can check that the user subscription has not expired yet but was canceled. Or you can check that the subscription is in billing retry status and show a special offer to such user.
Qonversion.checkUser({ result in
guard let activeProduct = result.activeProducts.first else {
// Flow for users without any active subscription
return
}
if activeProduct.state == .trial, activeProduct.status == .active {
// Flow for users with active subscription
}
}) { _ in }
Debug Mode
Set debug mode for checking user receipt on correct environment and collect data in sandbox
Qonversion.setDebugMode(true)
1.0.0
Receipt Validation
Qonversion SDK provides a method for checking user subscription status. That makes your app flow more flexible. For example, you can check that the user subscription has not expired yet but was canceled. Or you can check that the subscription is in billing retry status and show a special offer to such user.
Qonversion.checkUser({ result in
guard let activeProduct = result.activeProducts.first else {
// Flow for users without any active subscription
return
}
if activeProduct.state == .trial, activeProduct.status == .active {
// Flow for users with active subscription
}
}) { _ in }
Debug Mode
Set debug mode for checking user receipt on correct environment and collect data in sandbox
Qonversion.setDebugMode(true)
1.0.0-beta.4
Set debug mode for checking user receipt on correct environment and collect data in sandbox
Qonversion.setDebugMode(true)