What's new
- Promotional offer support
To load the promo offer data, call the following function.
// You can obtain the product and discount in any other way. This approach is used here as an example.
let mainProduct: Qonversion.Product = products["main"]
let discount: SKProductDiscount = mainProduct.skProduct?.discounts.first(where: $0.identifier == "main_promo_offer")
Qonversion.shared().getPromotionalOffer(for: mainProduct, discount: discount) { promoOffer, error in
// show paywall with promo offer
}
Then make a purchase using this promo offer.
let purchaseOptions = Qonversion.PurchaseOptions(promoOffer: promoOffer)
Qonversion.shared().purchaseProduct(mainProduct, options: options) { entitlements, error, cancelled in
// handle purcahse result here
}