好吧,所以基本上我一直在卡住2天,似乎anybadoy有我的問題,所以如果任何人都可以幫助,我會非常感謝!BAD_ACCESS with SKProductRequest
我有我的inappPurchaseManager.h
#import <StoreKit/StoreKit.h>
#define kInAppPurchaseManagerProductsFetchedNotification @"kInAppPurchaseManagerProductsFetchedNotification"
@interface InAppPurchaseManager : NSObject <SKProductsRequestDelegate>
{
SKProduct *proUpgradeProduct;
SKProductsRequest *productsRequest;
}
- (void)requestProUpgradeProductData;
@end
然後在我的.m我有
- (void)requestProUpgradeProductData
{
NSSet *productIdentifiers = [NSSet setWithObject:kMyCompany ];
productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
productsRequest.delegate = self;
[productsRequest start];
NSLog(@"a");
}
這是我的應用程序崩潰......與EXC_BAD訪問之後
..
我調用另一個類的requestProUpgradeProductData
我正在使用ARC
非常感謝!
你如何處理委託方法? (SKProductsRequestDelegate) – janusbalatbat 2012-07-06 07:28:19