I'm trying to set up IAP but after making a call to retrieve the products using SKProductsRequest the SKProductsResponse array within my delegate has a count of 0. Here's my checklist:
- Test product has been added to iTunes connect
- The product's bundle id matches the app bundle id (and its not using a wildcard)
- The product identifier set in the SKProductRequest matches the product created on iTunes connect
- I've waited several hours since the product was created on iTunes connect
- The provisioning profiles enable IAP
- Followed all steps in various tutorial such as http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/ etc.
- Have deleted app from device, relaunched Xcode, rebuilt etc. etc.
Any other suggestions as to why the fetched product count is zero?
I don't believe this will be a coding issue, but here it is anyway:
…
NSSet *productIdentifiers = [NSSet setWithObjects:@"redacted", nil];
self.productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
self.productsRequest.delegate = self;
[self.productsRequest start];
…
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
NSArray *products = response.products;
NSLog(@"Product count: %d", [products count]);
for (SKProduct *product in products)
{
NSLog(@"Product: %@ %@ %f", product.productIdentifier, product.localizedTitle, product.price.floatValue);
}
}