//
// InAppPurchaseManager.h
// Iap
//
// Created by Zhu Jianfei on 12/30/14.
// Copyright (c) 2014 Zhu Jianfei. All rights reserved.
//
#ifndef Iap_InAppPurchaseManager_h
#define Iap_InAppPurchaseManager_h
#import <StoreKit/StoreKit.h>
#define kInAppPurchaseManagerProductsFetchedNotification @"kInAppPurchaseManagerProductsFetchedNotification"
#define kInAppPurchaseManagerTransactionFailedNotification @"kInAppPurchaseManagerTransactionFailedNotification"
#define kInAppPurchaseManagerTransactionSucceededNotification @"kInAppPurchaseManagerTransactionSucceededNotification"
@interface InAppPurchaseManager : NSObject <SKProductsRequestDelegate, SKPaymentTransactionObserver>
{
SKProduct *proUpgradeProduct;
SKProductsRequest *productsRequest;
}
+ (InAppPurchaseManager *) getInstance;
- (void)getInfo:(NSString *)bundleId;
- (void)addStoreObserver;
- (void)removeStoreObserver;
- (BOOL)canMakePurchase;
- (void)buyPurchase:(int)type;
enum PurchaseType{
PurchaseOne,
PurchaseTwo,
PurchaseThree,
PurchaseFour,
PurchaseFive
};
@end
extern "C" {
bool isCanPurchase();
void buyPurchaseByType(int type);
}
#endif
评论5
最新资源