#define kMyFeatureIdentifier @"com.yourcompany.FussballQuiz"
- (void) initializeStore
{
SKProductsRequest *request= [[SKProductsRequest alloc]
initWithProductIdentifiers:
[NSSet setWithObject: kMyFeatureIdentifier]];
request.delegate = self;
[request start];
}
-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse: (SKProductsResponse *)response
{
}
- (void) request:(SKRequest *)request didFailWithError:(NSError *)error
{
NSLog(@"Failed to connect with error: %@", [error localizedDescription]);
}
无法连接错误:无法连接到iTunes Store .. 为什么不在iphone中调用didReceiveResponse?
答案 0 :(得分:1)
您只能使用真实设备测试购买。模拟器将始终返回错误。请务必事先在设备上注销iTunes商店帐户并使用沙盒用户。
编辑:
有关更多指导,请参阅此处: