Reputation: 1084
I have called "start" method of the "SKProductsRequest" class after creating and initializing object for the same.The delegate of this object is defining productsRequest:didReceiveResponse: method and request:didFailWithError: method. After the method request:didFailWithError: is called i'm getting an error saying "Cannot connect to iTunes Store". .My code is as follows:
-(IBAction)sendProductInfoRequest{
NSLog(@"sendProductInfoRequest");
NSSet *identifiersSet=[NSSet setWithObject:[NSString stringWithFormat:@"%@",@"com.hurix.Kitaboo.07APRIL201101"]];
SKProductsRequest *productRequest=[[SKProductsRequest alloc] initWithProductIdentifiers:identifiersSet];
productRequest.delegate=self;
[productRequest start];
NSLog(@"completing sendProductInfoRequest");
}
- (void)request:(SKRequest *)request didFailWithError:(NSError *)error{
NSLog(@"request didFailWithError");
NSLog(@"The product request didFailWithError: %@",[error localizedDescription]);
}
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{
NSLog(@"yoooo!");
NSLog(@"The product request didReceiveResponse :%@",[response description]);
}
Upvotes: 2
Views: 1038
Reputation: 5541
Usually it's really fast, couple of seconds at most. I'm guessing you're doing this on the sandbox environment, which I found really unreliable and unresponsive at times. I wouldn't worry too much about it and try again in a few hours.
Upvotes: 1