plist の消耗品キーは次のようになります。
<key>Consumables</key>
<dict>
<key>com.yourcompany.yourapp.handfulofcoins</key>
<dict>
<key>Count</key>
<integer>10</integer>
<key>Name</key>
<string>CoinsInMyApp</string>
</dict>
<key>com.yourcompany.yourapp.bagofcoins</key>
<dict>
<key>Count</key>
<integer>100</integer>
<key>Name</key>
<string>CoinsInMyApp</string>
</dict>
</dict>
文字列「CoinsInMyApp」を照合して、購入したコインの数を、それらがどの消耗品からのものであっても計算します。上記の例では、ユーザーが 1 袋のコインと 2 握りのコインを購入した場合、MKStoreManager はキー CoinsInMyApp に 120 を格納します。
メソッド、
- (BOOL) canConsumeProduct:(NSString*) productIdentifier
- (BOOL) canConsumeProduct:(NSString*) productIdentifier quantity:(int) quantity
十分な製品があるかどうかを教えてくれます。
プレーヤーがコインを使用するときは、呼び出して MKStoreKit にこれを知らせる必要があります。
- (BOOL) consumeProduct:(NSString*) productIdentifier quantity:(int) quantity
呼び出すとコインの数を取得できます
[[MKStoreManager numberForKey:@"CoinsInMyApp"] intValue];
PS: -fobjc-arc フラグを付けてコンパイルすることにより、非 ARC プロジェクトで MKStoreKit の最新バージョンを使用できます。
私はこれについてここに書いたhttp://blog.mugunthkumar.com/articles/migrating-your-code-to-objective-c-arc/