IAPSdk

ARC and GCD Compatible Reachability Class for iOS and OS X.


License
MIT
Install
pod try IAPSdk

Documentation

IAPSdk - IN APP PURCHASE

Overview

In-app purchases can be used to sell a variety of content, including subscriptions, new features, and services. There are four types of in-app purchases. Users can make in-app purchases on iOS, macOS, and tvOS.

Consumable

Users can purchase different types of consumables, such as lives or gems in a game, to further their progress through an app. Consumable in-app purchases are used once, are depleted, and can be purchased again.

Non-Consumable

Users can purchase non-consumable, premium features within an app. Non-consumables are purchased once and do not expire, such as additional filters in a photo app. Apple can host content associated with your non-consumable in-app purchases.

Auto-Renewable Subscriptions

Users can purchase access to services or periodically updated content, such as monthly access to cloud storage or a weekly subscription to a magazine. Users are charged on a recurring basis until they decide to cancel.

Auto-renewable Subscriptions

Users can purchase access to services or content for a limited duration, such as a season pass to streaming content. This type of subscription does not renew automatically, so users need to renew each time.

Installation

pod 'IAPSdk'

Usage


    PKIAPHandler.shared.PRODUCT_ID = "com.ios.**Auto-renewable"
    PKIAPHandler.shared.SHARED_SECRET = "7d6***********448ceb555"

    PKIAPHandler.shared.pushase()
    PKIAPHandler.shared.onSuccessPurhased = { [weak self] () -> Void in
        
    }

    PKIAPHandler.shared.restore()
    PKIAPHandler.shared.onSuccessRestore = { [weak self] () -> Void in
        
    }

    PKIAPHandler.shared.verifySubscription()