MKStoreKit错误

时间:2014-02-06 16:00:36

标签: ios mkstorekit

我正在尝试按照此tutorial实施应用内购买(productID:PBonnet.TOEIC3.p。

首先,我在MKStoreKitConfigs.h中添加了:

#define kKlimtPictureSetId @"PBonnet.TOEIC3.Package1"

然后,我在MKStoreKitConfigs.plist中将我的产品添加到非消耗品类别中。

然后,我添加了我的AppDelegate.m:

[MKStoreManager sharedManager];

然后,我在ViewController的ViewDidLoad中添加了我想知道package1是否已被购买的地方:

[MKStoreManager isFeaturePurchased:kKlimtPictureSetId];

我收到错误:

Use of undeclared identifier `MKStoreManager`

我试图在我的ViewController中导入“appdelegate.m”,但是找不到它。

我不知道如何使用方法[MKStoreManager isFeaturePurchased:kKlimtPictureSetId];。它必须返回一个布尔值,但我们如何访问它呢?

干杯

2 个答案:

答案 0 :(得分:2)

将此行添加到ViewController.h

#import "MKStoreManager.h"

答案 1 :(得分:2)

第6页

  

[[MKStoreKit sharedKit] isProductPurchased:@“you id”];