UNICORN - iOS
MProductAgent.h
1 #import <StoreKit/StoreKit.h>
2 
3 
4 // ローカライズ用のキー定義
5 #define STORE_GET_ITEM_ERROR_KEY @"store get item error"
6 
7 
8 // 課金アイテム種別
9 typedef enum{
10  MProductConsumable,// 消耗型
11  MProductNonConsumable,// 非消耗型
12  MProductAutoRenewableSubscriptions,// 自動更新有料購読
13  MProductFreeSubscription,// 無料購読
14  MProductNonRenewingSubscription,// 有料購読
15 } MProductType;
16 
17 
18 @interface MProductAgent : NSObject<SKProductsRequestDelegate>
19 
20 //アイテムの情報を取得(複数指定)
21 + (id)productsWithProductIdentifiers:(NSSet *)productIdentifiers
22  completeBlock:(void (^)(SKProductsResponse *response))cBlock
23  errorBlock:(void (^)(NSError *error))eBlock;
24 
25 //アイテムの情報を取得(1つ指定)
26 + (id)productWithProductIdentifier:(NSString *)productIdentifier
27  completeBlock:(void (^)(SKProductsResponse *response, SKProduct *product))cBlock
28  errorBlock:(void (^)(NSError *error))eBlock;
29 
30 @end
Definition: MProductAgent.h:18