Latest 0.3.0
Homepage https://github.com/z234009184/OkayIAPManager
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Introduce

It’s a easy In-App Purchase Lib.
To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 8.0 or later.

Installation

OkayIAPManager is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'OkayIAPManager'

Usage

/// start purchase
- (IBAction)action:(id)sender {

    [[OkayIAPManager shareInstance] startPurchWithProductId:@"cn.okay.IAPurch_1" orderId:@"xxx" completeHandle:^(OkayIAPurchType type, NSString *orderId, NSData *data, SKPaymentTransaction *transaction) {

    }];
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    /// check drop order
    [[OkayIAPManager shareInstance] checkLoseIAPOrderCallBack:^(OkayIAPurchType type, NSString *order, NSData *data) {
        if (type == OkayIAPurchTypeSuccess) {
            /// simulate verify purchase result at your servers.
            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                /// must be removeCurrentTransaction in the end.
                [[OkayIAPManager shareInstance] removeCurrentTransaction];
            });
        }
    }];

    return YES;
}

Author

zhangguoliang, [email protected]

License

OkayIAPManager is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "OkayIAPManager",
    "version": "0.3.0",
    "summary": "A In-App Purchase Lib",
    "description": "It's a easy In-App Purchase function Lib",
    "homepage": "https://github.com/z234009184/OkayIAPManager",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "zhangguoliang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/z234009184/OkayIAPManager.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "OkayIAPManager/Classes/**/*"
}

Pin It on Pinterest

Share This