我正在实施应用程序内购买,我不是一个非常有经验的开发人员。 我使用布兰特特洛伊教程我发现这里: Tutorial错误objective-c在应用程序购买实施
我在loadStore方法实现的错误: 发送“InAppPurchaseManager * const的__strong”到不兼容的类型“ID”
//
// InAppPurchaseManager.h
//
#import <Foundation/Foundation.h>
#import <StoreKit/StoreKit.h>
@interface InAppPurchaseManager : NSObject <SKProductsRequestDelegate>
{
SKProduct *proUpgradeProduct;
SKProductsRequest *productsRequest;
}
// public methods
- (void)loadStore;
- (BOOL)canMakePurchases;
- (void)purchaseProUpgrade;
@end
---
#import "InAppPurchaseManager.h"
#define kInAppPurchaseProUpgradeProductId @"com.user.app.product"
@implementation InAppPurchaseManager
- (void)loadStore
{
// restarts any purchases if they were interrupted last time the app was open
[[SKPaymentQueue defaultQueue] addTransactionObserver: self];
ERROR HERE: Sending 'InAppPurchaseManager *const __strong' to parameter of incompatible type 'id<SKPaymentTransactionObserver>'
// get the product description (defined in early sections)
[self requestProUpgradeProductData];
}
@end
的参数
任何人都可以帮助我吗?
Ooooooh NO。我已经做到了。现在它工作。谢谢。 – Byteros 2012-01-07 00:38:12
欢迎您! @Byteros – 2012-01-07 23:59:56