我正在實施應用程序內購買,我不是一個非常有經驗的開發人員。 我使用布蘭特特洛伊教程我發現這裏: 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