-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIAPHelper.h
38 lines (30 loc) · 1.16 KB
/
IAPHelper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// IAPHelper.h
// InAppRage
//
// Created by Ray Wenderlich on 2/28/11.
// Copyright 2011 Ray Wenderlich. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "StoreKit/StoreKit.h"
#define kProductsLoadedNotification @"ProductsLoaded"
#define kProductPurchasedNotification @"ProductPurchased"
#define kProductPurchaseFailedNotification @"ProductPurchaseFailed"
@interface IAPHelper : NSObject <SKProductsRequestDelegate, SKPaymentTransactionObserver> {
NSSet * _productIdentifiers;
NSArray * _products;
NSMutableSet * _purchasedProducts;
SKProductsRequest * _request;
}
@property (retain) NSSet *productIdentifiers;
@property (retain) NSArray * products;
@property (retain) NSMutableSet *purchasedProducts;
@property (retain) SKProductsRequest *request;
- (void)requestProducts;
- (id)initWithProductIdentifiers:(NSSet *)productIdentifiers;
- (void)buyProductIdentifier:(NSString *)productIdentifier;
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue;
// For overriding
- (void)recordTransaction:(SKPaymentTransaction *)transaction;
- (void)provideContent:(NSString *)productIdentifier;
@end