1

I have registered my products for In App Purchase. I created a sample app for getting the products. Its working just fine.

When I integrated that code in my existing app I am getting empty product list. In-App related classes are same in both projects so product identifiers are same as well and all request response process is same.

I tried to keep same bundle identifier to bot app which I have used for the app to registered the product and provisioning profile is also same in both of my project (Main and sample).

I don't know but for some reason I am not getting my products in my project while I am getting it in sample.

Here is the code

  -(void)requestProducts
 {
    NSSet * prodIdentifiers=[NSSet setWithObjects:@"com.test.product1", @"com.test.product2", nil];
    self.reqProdcut = [[[SKProductsRequest alloc] initWithProductIdentifiers:prodIdentifiers] autorelease];
    reqProdcut.delegate = self;
    [reqProdcut start];
    self.ReceiptData=[NSMutableData data];
}

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response 
{
    NSLog(@"Received products results... %@", response.debugDescription);

    NSLog(@"%@",response.products);
    self.products =response.products; // here I get empty array in response.products

}

Any help please.

EDIT

Just gone through this [Link] (In-App Purchase response.products empty)

All of my product identifiers from my app are in response.invalidProductIdentifiers while in my sample all is correct.

Community
  • 1
  • 1
Smart Developer
  • 72
  • 2
  • 10
  • Have you already checked [related](http://stackoverflow.com/questions/6654316/in-app-purchase-response-products-empty?rq=1) [questions](http://stackoverflow.com/questions/2138972/iphone-in-app-purchase-response-products-are-still-empty-please-help?rq=1) – kovpas Jan 31 '13 at 16:36
  • @kovpas yes I checked (http://troybrant.net/blog/2010/01/invalid-product-ids/) and only No for `Have you submitted (and optionally rejected) your application binary?`. I haven't submitted binary but if this is the problem why products are coming in my sample app? – Smart Developer Jan 31 '13 at 16:40
  • And what about [this](http://stackoverflow.com/a/2741865/300798) answer? Have you tried to delete the app from your device and then re-upload it with Xcode? – kovpas Jan 31 '13 at 16:48
  • 1
    In-app purchases dont work on the simulator just in case you are using it. – shoughton123 Jan 31 '13 at 17:30

0 Answers0