Search code examples
ios5in-app-purchase

inApp Purchase in iOS products returned no product in the response


I am following tutorial of raywenderlich on the following blog:

http://www.raywenderlich.com/2797/introduction-to-in-app-purchases

Everything is working fine in the code, all delegate methods are being called properly, but still there is no product returned against product identifiers

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {

    self.products = response.products;
    NSLog(@"products array count= %i", [self.products count]);  //products array count=0  :(
}

Has anyone tried the same code, can suggest me what is the problem in it ?

<SKProductsRequestDelegate, SKPaymentTransactionObserver>

are used in this tutorial,

i've successfully created product identifier and app id. so only problem is to load that product against identifier. is there any other classes or InApp reusable code which you think is suitable than this?

already spent whole day to fix the problem, finally posted here to get help.

Thanks


Solution

  • There can be a lot of places where in-app purchase set up can go wrong. And the problem is often not within the code. I found this checklist very helpful:

    Invalid product IDs