ZSKitDelegate
public protocol ZSKitDelegate
This delegate is used to update the app if users are initated any promo purchase from the app store. The delegate methods can be called anytime after the delegate is set in to sdk. Make sure your app is capable of anytime when the delegate methods are called.
-
Tells the delegate that a user initiated an in-app purchase from the App Store. Call the completion block to process the purchase. If the app is not in the state to make a purchase then store the completion at your end and call it when your app is ready. If you want to cancel the transaction, just ignore the delegate. This delegate method is called when the user starts an in-app purchase in the App Store, and the transaction continues in your app. Specifically, if your app is already installed, the method is called automatically. If your app is not yet installed when the user starts the in-app purchase in the App Store, the user gets a notification when the app installation is complete. This method is called when the user taps the notification. Otherwise, if the user opens the app manually, this method is called only if the app is opened soon after the purchase was started.
Declaration
Swift
func shouldPurchasePromoProduct(product: SKProduct, payment: SKPayment, initiatePurchase: @escaping () -> ())Parameters
productThe in-app purchase product. The corresponding
SKProductfor promo code applied on the app storepaymentThe payment request.
completionCall this completion block to initiate purchase for the promocode applied. If you don’t want to process the promocode applied, you can simply refrain from calling the completion block.
-
This method will be called whenever the subscription status has been updated for the user. Any changes in subscription will be intimated to the app via this method.
Declaration
Swift
func didSubscriptionDetailsUpdated(subscriptionDetail: ZSSubscriptionDetail)Parameters
subscriptionsThe updated
ZSSubscriptionDetailObject. -
This method will be called whenever the IAP products has been created for the user in Zoho Billing.
Declaration
Swift
func didIAPProductsUpdated(iapProducts: [ZSIAPProductPurchaseDetail])Parameters
iapProductsThe created IAP products will be passed as array.
Install in Dash