Qonversion - Mobile app subscription analytics v2.0.0 Release Notes

Release Date: 2020-08-13 // over 3 years ago
  • ⚡️ 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

    A111

    1. Application calls the purchase method to initialize Qonversion SDK.
    2. Qonversion SDK communicates with StoreKit or Google Billing Client to make a purchase.
    3. 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.
    4. SDK returns control to the application with a processing state

    Purchasing

    Qonversion.purchase("main") { (permissions, error, isCancelled) inif let error = error { self.process(error, isCancelled: isCancelled) return } self.process(permissions) }
    

    Check permission

    Qonversion.checkPermissions { (permissions, error) inif let error = error { // handle errorreturn } 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 lifetimebreakcase .billingIssue:// Grace period: permission is active, but there was some billing issue.// Prompt the user to update the payment method.breakcase .cancelled:// The user canceled the subscription, but the subscription has not expired yet.// Prompt the user to resubscribe with some special offer.breakdefault: break } } }
    
    Qonversion.products { products inself.setupProducts(products) }
    

    Async setting for user id

    Qonversion.setUserID("your side user id")