Swiftpack.co - Package - qonversion/qonversion-ios-sdk

Qonversion provides full in-app purchases infrastructure, so you do not need to build your own server for receipt validation.

Implement in-app subscriptions, validate user receipts, check subscription status, and provide access to your app features and content using our StoreKit wrapper and Google Play Billing wrapper.

Read more in documentation.

Version Platform Carthage compatible MIT License

Product Center

  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

Analytics

Monitor your in-app revenue metrics. Understand your customers and make better decisions with precise subscription revenue data.

Integraitons

Share your iOS and Android in-app subscription data with your favorite platforms.

License

Qonversion SDK is available under the MIT license.

Github

link
Stars: 60

Dependencies

Used By

Total: 0

Releases

2.4.0 - 2020-10-21 11:30:37

AppStore promo purchases support

2.3.2 - 2020-10-04 08:59:13

  • Fix products handling for empty response
  • Update sample app by adding storekit configuration file

2.3.1 - 2020-10-01 16:44:09

Reduce properties sending period

2.3.0 - 2020-09-30 12:42:40

What's new

  • Added requests caching
  • Updated products loading flow and interface

2.2.2 - 2020-09-28 10:41:49

๐Ÿž Fixes

  • Implement - (void)request:(SKRequest *)request didFailWithError:(NSError *)error for additional logging

2.2.1 - 2020-09-25 17:23:50

๐Ÿž Fixes

  • Fix incorrect calls for delayed blocks executions
  • Update sample app

2.2.0 - 2020-09-25 17:23:08

What's new

๐Ÿ“ฆ Swift Package Manager

Just provide the link https://github.com/qonversion/qonversion-ios-sdk to the SDK for importing package through SPM.

image

๐Ÿ‘จโ€๐Ÿณ restore with permissions

Qonversion.restore { [weak self] (permissions, error) in
  if let error = error {
    // Error
  }
      
  guard permissions.values.contains(where: {$0.isActive == true}) else {
     // No purchases to restore
  }
  
  if let permission: Qonversion.Permission = permissions["plus"], permission.isActive {
    // Restored
  }
}

๐Ÿ–ผ Sample app with Product Center

๐Ÿงพ Support property for AppsFlyer userID and Adjust user ID

Qonversion.setProperty(.appsFlyerUserID, value: AppsFlyerLib.shared().getAppsFlyerUID())

1.2.4 - 2020-09-20 16:42:28

Support property for AppsFlyer userID and Adjust user ID

Qonversion.setProperty(.appsFlyerUserID, value: AppsFlyerLib.shared().getAppsFlyerUID())

1.2.3 - 2020-09-09 08:42:38

2.0.3 - 2020-08-25 16:05:02

Fix access level for models

2.0.2 - 2020-08-16 11:20:02

Allow using camel case for properties naming

1.2.2 - 2020-08-16 11:18:24

Allow using camel case for properties naming

2.0.1 - 2020-08-13 20:09:36

Supporting Carthage

1.2.1 - 2020-08-13 19:23:47

Supporting Carthage

2.0.0 - 2020-08-13 08:55:42

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) 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.0 - 2020-07-03 05:07:55

  • Add Kochava Device ID as a system user property

1.1.2 - 2020-06-18 10:23:38

  • Fix new Appsflyer data attribution method

1.1.1 - 2020-06-04 19:36:56

Add additional check for responds selector for avoiding troubles on Facebook Swift SDK

1.1.0 - 2020-05-28 10:01:28

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: "me@qonvesrion.io")

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 - 2020-05-13 11:08:47

Added additional checking for saved user id for avoiding crashes when persistent volume fails

1.0.3 - 2020-04-28 15:09:24

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 - 2020-04-28 11:31:17

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 - 2020-04-20 13:18:11

Set debug mode for checking user receipt on correct environment and collect data in sandbox

Qonversion.setDebugMode(true)

1.0.0-beta.3 - 2020-04-10 16:18:38

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 }

1.0.0-beta.1 - 2020-04-10 11:09:14