Skip to main content
Integrating Qonversion No-Codes with your own purchasing infrastructure necessitates:
  • creating a product within the Qonversion dashboard and associating it with a purchase action on your screen,
  • implementing and providing a PurchaseDelegate to Qonversion No-Codes that is responsible for managing purchase and restore requests from No-Code screens.

Unity warning

On Android, when a No-Codes screen is displayed, Unity’s game loop is paused because the No-Codes screen runs as a separate Activity on top of Unity’s Activity. This means that this delegate will only work on iOS, and will not work on Android.

Implementing PurchaseDelegate

To handle purchase and restore requests from No-Code screens on your end, you should implement PurchaseDelegate. It has two simple methods - purchase, accepting the requested product, and restore.
extension MyPurchaseHandler: NoCodesPurchaseDelegate {
  func purchase(product: Qonversion.Product) async throws {
    // Execute the purchase as you wish here
    // You can throw exceptions in case of errors
  }
  
  func restore() async throws {
    // Execute the restore as you wish here
    // You can throw exceptions in case of errors
  }
}

Providing PurchaseDelegate

Once you’ve implemented the PurchaseDelegate, you need to provide it to Qonversion No-Codes. There are two equal ways to do it - during the initialization via configuration or after - via the No-Codes method.
// Providing during the initialization
let purchaseDelegate = MyPurchaseHandler()
let configuration = NoCodesConfiguration(projectKey: "projectKey", purchaseDelegate: purchaseDelegate)
NoCodes.initialize(with: configuration)

// Or after initialization
let purchaseDelegate = MyPurchaseHandler()
NoCodes.shared.set(purchaseDelegate: purchaseDelegate)

Availability

The described feature is available in the following SDK versions
PlatformSDK version
iOS6.1.0+
AndroidNo-Codes 1.2.1+
React Native10.1.0+
Flutter11.1.0+
Unity9.0.0+
Cordova7.0.0+
Capacitor1.0.0+

Success and Failure Actions Create Offerings