ssj
ssj

Reputation: 881

iOS in-app SKProduct not showing up on iphone but does in simulator

As the the title suggests, When requesting a list of SKProducts and running from the simulator, i would get the correct array, however on the actual iphone, the array would contain 0 items.

NSSet *productSet = [NSSet setWithObject:@"com.somewebsite.someapp.inappproduct"];
SKProductsRequest *pr = [[SKProductsRequest alloc]initWithProductIdentifiers:productSet];
pr.delegate = self;
[pr start];
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];


#pragma mark - purchasing
- (void)productsRequest:(SKProductsRequest *)request 
     didReceiveResponse:(SKProductsResponse *)response 
{
    NSLog(@"response = %@",response.products);
    if (response.products.count > 0)
    {
        self.products = response.products;
        [thetable insertSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationFade];
    }
}

Upvotes: 2

Views: 1694

Answers (1)

Shubhank
Shubhank

Reputation: 21805

If it works in the simulator(don't know how??) but not on the phone..then the problem can only be explained if your device is jailbroken.

http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/

Follow the above link and include the NSLog for Invalid product identifiers.. If you get that log .the site provide the various cases in which it occurs so that you can solve tim

Upvotes: 1

Related Questions