Reputation: 138
thanks for reading. I was success with IAP before, but now, when come back on 2nd project about IAP, I always get popular "Invalid Product ID" result. Here is what I've done:
1) Create App ID: com.tim.TestIAP
2) Create Provisioning profile, with In-App Purchase (already checked) and install this into Xcode
3) Go to iTunes connect and add app with bundleID = com.tim.TestIAP
4) Add In-App Purchase products:
a) com.tim.TestIAP.C1
b) com.tim.TestIAP.C2
c) com.tim.TestIAP.NC
5) Open XCode and create new project with ID = com.tim.TestIAP
6) Set code signing = com.tim.TestIAP provisioning profile
7) Write code handle Storekit
productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:@"com.tim.TestIAP.C1"]];
productsRequest.delegate = self;
[productsRequest start];
8) Archive project and submit to iTunes connect.
9) Wait (over 48 hour til now)
10) Now I get:
a) iTunesconnect: App status = Waiting for review, IAP status = In review
b) App installed on device via XCode (I signed out iTunes account on device)
But everytime I tried to send product request, with correct Product ID, I still get this product in SKProductsResponse.invalidProductIdentifiers
Please tell me where I was wrong, thankyou very much
Upvotes: 5
Views: 10221
Reputation: 2670
Did you complete the paid apps agreement in 'Agreements, Tax and Banking' in iTunes connect? I have missed that and spend days on technical analysis. After completion it worked in minutes.
Upvotes: 1
Reputation: 678
I tried everything everyone is talking about. I ended up making a guest account first to see if the product ID could be found.... It was. So then I started quitting everything in activity monitor and found the problem. I had to quit the "store" processes below. All of a sudden I stopped getting the invalid product ID. Hope that helps someone out there.
Quit these and then build and run if you're getting the invalid product id null error
Upvotes: 1
Reputation: 992
One more possibility: does the bundle ID match? I have a set up where I append "Beta" automatically to the bundle ID of my debug builds, and forgot about that during testing.
Upvotes: 3
Reputation: 1663
Did you try remove app from device, clean your xcode and reinstall your app again? Its so classic answer i know but it worked for me before and you be sure if your purchase is for free or not, free purchases absolutely dont work. Your purchase should be in ready to submit or waiting for screenshot mode if you using it with test account. Also be sure about if your test account is working (if you tried sign with it before in iphone or in site, this account will be invalid.) Hope it can help.
Upvotes: 4
Reputation: 1087
Are you using iTunes Connect test accounts to purchase the IAPs?
You can't use real Apple id until your application + in-app purchases are approved, until then you can create test accounts from iTunes connect -> Manage Users -> Test User and use those credentials to purchase your testing IAPs
Upvotes: 0