Question

I know that similar question was asked many times, but non, of them works for me.

I try to build in-app purchases in my app.

I create new app ID :

enter image description here

I put it in a bundle of my app :

enter image description here

I created new product (auto-renewable), I crack the Cleared for Sale, I upload image so the product is in (orange circle) waiting for review state .

enter image description here

I build application with right provision profile in Xcode :

enter image description here

and I wait more than 24 hours.

I also upload binary and stop the process, but I read after that this is now not necessary.

My code is :

#define kBuyCubeProductIdentifier @"BIM02_APP01"
....
if ([SKPaymentQueue canMakePayments]) {
    NSLog(@"User can make payments");


    NSLog(@"identifier : %@", kBuyCubeProductIdentifier);
    request = [[SKProductsRequest alloc]initWithProductIdentifiers:[NSSet setWithObject:kBuyCubeProductIdentifier]];
    request.delegate = self;
    [request start];
}
else{
    NSLog(@"User cannot make payments due to parental controls");
} 
....

- (void) productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{

    NSLog(@"products invalid : %@", response.invalidProductIdentifiers);

    SKProduct * validProduct = nil;
    int count = response.products.count;
    if (count > 0) {
        validProduct = [response.products objectAtIndex:0];
        [self purchase:validProduct];
        NSLog(@"Products Available!");

    }
    else if (!validProduct)
    {
        NSLog(@"No products available");
    }
}

And I get response in log:

User can make payments
identifier ; BIM02_APP01
products invalid : (
    "BIM02_APP01"
)
No products available

Can anyone can help me, because I stuck here for 2 days now, and I can't figure it out.

Was it helpful?

Solution

make sure you are fulfilling all condition which are given below

1.Have you enabled In-App Purchases for your App ID?

2.Have you checked Cleared for Sale for your product?

3.Have you submitted (and optionally rejected) your application binary?

4.Does your project’s .plist Bundle ID match your App ID?

5.Have you generated and installed a new provisioning profile for the new App ID?

6.Have you configured your project to code sign using this new provisioning profile?

7.Are you building for iPhone OS 3.0 or above?

8.Are you using the full product ID when when making an SKProductRequest?

9.Have you waited several hours since adding your product to iTunes Connect?

10.Are your bank details active on iTunes Connect? (via Mark)

11.Have you tried deleting the app from your device and reinstalling?

If you answered “No” to any one of these questions, there’s your problem.

Also check this link. Hope this will clear your maximum doubt why your are getting invalid product.

OTHER TIPS

The method response.products is returning 0 products MOST OF THE TIME. I would estimate that 10% of the time I get the correct price back. This is consistent on the marketplace and the individual item page on the app.

My delegate method is ...

(void)productsRequest:(SKProductsRequest *)request 
      didReceiveResponse:(SKProductsResponse *)response {}

This SO posts mention this 11 point list [(ProductsRequest didReceiveResponse returns invalid products but I can't find & I don't think this would apply with intermittent behavior...

Could bank details really be the cause of this. My APPLE ID developer account was updated yesterday about 24 hours ago....?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top