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 :
I put it in a bundle of my app :
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 .
I build application with right provision profile in Xcode :
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.
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.