i am implementing this code :
if ([SKPaymentQueue canMakePayments])
{
// Display a store to the user.
NSLog(@"Device Can Make Payments");
SKProductsRequest *ProductRequst = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithObjects:@"slalomtfcoins", nil]];
ProductRequst.delegate = self;
[ProductRequst start];
}
else {
// Warn the user that purchases are disabled.
NSLog(@"Device Can't Make Payments");
UIAlertView *thealert = [[UIAlertView alloc]initWithTitle:@"Your Device Limited" message:@"we have noticed that you device restrictions setting are currently limited. you can change it ny going to Settings -> General -> Restrictions and turn it off" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[thealert show];
[thealert release];
}
-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{
SKProduct *VailProduct = nil;
NSLog(@"%d",[response.products count]);
int count = [response.products count];
if (count>0) {
VailProduct = [response.products objectAtIndex:0];
NSLog(@"Products are availble");
} else if (!VailProduct){
NSLog(@"Products are Not availble");
}
}
and the log prints “Products are Not availble”.
the bundle id in my p.list are correct
and the product id is the same as the itunes connect.
what is the problem?
thanks
Things to try.
device
Another fix that I discovered that probably wont help but you may try is to create a new test account user and try that one. Since your issue is simply validating, not purchasing, that probably wont help. I just mention it in case you have problems down the road too.
Also if this is the first time doing this you should double check the app id and product ids just to be sure.