API documentation

Classes and Protocols

The most important class is InAppPurchase. All the functions you need are defined in this class.

If you have consumable and/or non-renewing subscription products in your application, you must have a class that adopts the IAPPurchaseDelegate protocol.

Products

Callbacks

refresh(), purchase() and restorePurchases() are asynchronous functions. You must provide a callback that will allow you to perform actions depending on the result.

Errors

When calling refresh(), purchase() or restorePurchases(), the callback can return an IAPError if the state is failed. Look at IAPErrorCode to see the list of error codes you can receive.