I’m implementing the IN APP PURCHASE and I’m not a very experienced developer.
I’m using the brant troy tutorial I found here:
Tutorial
I have the error in loadStore method implementation:
Sending ‘InAppPurchaseManager *const __strong’ to parameter of incompatible type ‘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
Can anyone help me?
The answer is just like kperryua said, but just to make it clear:
it should work just fine.