ORStudios
ORStudios

Reputation: 3233

SKProductsRequest Returning Empty Results

I have looked over some of the other answers and they don't seem to help my situation. I have a new app that is nearly ready for its initial release and I am just working on the In App Purchase section. I have used IAP in a previous app so I thought the move over should be straight forward. The problem is, however, that whenever I run SKProductsRequest, it returns an empty results set.

I am using the following to make the request

productIdentifierList = [[NSMutableArray alloc] init];
[productIdentifierList addObject:[NSString stringWithFormat:@"xxxxxxxxxx"]];

SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:productIdentifierList]];

And the response goes to

-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
    NSLog(@"Recieved Product Response %@",response.products);
    [productDetailsList addObjectsFromArray: response.products];
    [productDisplayTableView reloadData];
}

I just don't seem to be getting any results returned. I have checked the ids and they seem ok; I have also run from my iPhone device via Xcode and still had no luck. The response in the debugger doesn't give a lot away as well.

Can anyone suggest some fixes for this issue?

Upvotes: 3

Views: 3060

Answers (1)

ORStudios
ORStudios

Reputation: 3233

It turns out that in new versions of IOS you no longer need to put in the full id of the app and then the iap id. Instead just put in the iap id.

[productIdentifierList addObject:[NSString stringWithFormat:@"iap_id"]];

Upvotes: 1

Related Questions