Latest 0.0.1
Homepage https://github.com/MrLujh/ApplePurchaseManager
License MIT
Platforms ios 7.0, requires ARC
Dependencies SVProgressHUD
Frameworks StoreKit
Authors

支持pod导入

  • pod ‘ApplePurchaseManager’

  • 执行pod search ApplePurchaseManager提示搜索不到,可以执行以下命令更新本地search_index.json文件
rm ~/Library/Caches/CocoaPods/search_index.json
  • 如果pod search还是搜索不到,执行pod setup命令更新本地spec缓存(可能需要几分钟),然后再搜索就可以了

使用    

  • AppDelegate中初始化
    // 后台生成的密钥
    NSString *purchaseKey = @"24717395719579835719857198";

    [ApplePurchaseManager sharedInstance].purchaseKey = purchaseKey;
  • 防止用户重复内购请求

“`objc      
if ([ApplePurchaseManager sharedInstance].isPurchasing) {

    return;
}

* 内购请求

```objc       
// 苹果后台配置生成
    NSString *productId = @"wp193950536";

    [[ApplePurchaseManager sharedInstance] startPurchaseWithProductID:@"" CompleteBlock:^(ApplePurchType type) {

    }];
  • 恢复内购

“`objc      
[[ApplePurchaseManager sharedInstance] restorePurchaseWithCompleteBlock:^(ApplePurchType type) {

}];


![Mou icon](https://github.com/MrLujh/Fastlane--Packaging/blob/master/111.gif)

Latest podspec

{
    "name": "ApplePurchaseManager",
    "version": "0.0.1",
    "authors": {
        "daniulaolu": "[email protected]"
    },
    "homepage": "https://github.com/MrLujh/ApplePurchaseManager",
    "summary": "ApplePurchase",
    "source": {
        "git": "https://github.com/MrLujh/ApplePurchaseManager.git",
        "tag": "0.0.1"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "ApplePurchaseManager/**/*.{h,m}",
    "dependencies": {
        "SVProgressHUD": []
    },
    "frameworks": "StoreKit"
}

Pin It on Pinterest

Share This