Warning: join(): Invalid arguments passed in /home/troyb/troybrant.net/blog/wp-content/themes/hybrid-hacked/hybrid-hacked/library/functions/breadcrumbs.php on line 79

Invalid Product IDs

Do you have an invalid product ID that won’t go away? Good thing the StoreKit API provides error codes and detailed error information explaining why the ID is invalid.

Oh, what’s that? There are no error codes or error details of any kind when you have an invalid product ID, you say? Bah, silly me.

To save you the pain of exhaustively searching the web for the cause of your error, here is a checklist of everything I have stumbled across that can cause an invalid product ID. Make sure you can answer “Yes” to each of these questions:

  • Have you enabled In-App Purchases for your App ID?
  • Have you checked Cleared for Sale for your product?
  • Have you submitted (and optionally rejected) your application binary?
  • Does your project’s .plist Bundle ID match your App ID?
  • Have you generated and installed a new provisioning profile for the new App ID?
  • Have you configured your project to code sign using this new provisioning profile?
  • Are you building for iPhone OS 3.0 or above?
  • Are you using the full product ID when when making an SKProductRequest?
  • Have you waited several hours since adding your product to iTunes Connect?
  • Are your bank details active on iTunes Connect? (via Mark)
  • Have you tried deleting the app from your device and reinstalling? (via Hector, S3B, Alex O, Joe, and Alberto)
  • Is your device jailbroken? If so, you need to revert the jailbreak for IAP to work. (via oh my god, Roman, and xfze)

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

If you answered “Yes” for each of these questions and you still have an invalid product ID, then you have a problem I haven’t seen before. Check out the links in the next section, several of which are Developer Forum posts that were especially helpful in my hunt for debugging invalid product IDs.

Resources for Debugging an Invalid Product

Here are the docs and resources I used to debug invalid product IDs:

If your solution for invalid product IDs wasn’t mentioned in the checklist above, please leave a comment detailing how you fixed the problem so I can keep the checklist up to date.

158 Responses to “Invalid Product IDs”

  1. One more:

    Are your bank details active on iTunes Connect?

    If you try to create a paid app without valid bank data on your account, you’ll get a nice big warning. But if you create a free app and then add a paid product to it, you’ll get no warning; it will just return your product IDs as invalid.

  2. Ok this list is really helpful, but I just want to add that I was getting the same error, and was unable to get it to work until I used the ProductIDs without the preceding bundle ID.

    i.e: when I used com.company.appname.productID, I get an invalid product ID error.

    When I use just “productID”, it starts working.

    Hope that saves someone some trouble.

  3. A couple of things you might want to remember:

    1: Developer Rejected status will cause your productID lookup to fail even though the In-App Purchases have been set to “Cleared for Sale” *and* your productIDs are correct.

    2: The only way you are able to use: “productID” vs “com.company.appname.productID” is if you did NOT USE Apple’s suggested domain naming convention of “com.company.appname.productID” . Easiest way to find this is to go to iTunes Connect->Manage Your In-App Purchases and look at the ProductID column. if it looks SOMETHING like: “com.company.appname.productID” then you have to use the entire string.

    3: You *must* build for “Distribution” (not debug) *and* have your iPhone Device hooked up *and* build for device…not simulator. This “gets” a lot of people.

    Reason #3 is the one that bit me.

  4. I just tested this a few times in a row and it seems that rejecting the binary causes the products response to be empty. However, if it’s left in “Waiting For Review” it works.

  5. Fantastic list. I’ve been struggling for hours, wasn’t till I built my app for distribution that it all worked. Got everything else right. Makes debugging quite hard though!

  6. I tried everything suggested in the Apple forums and here, and still couldn’t get it to work. Found the solution – your app needs to be transferred by Xcode for the sandbox to be enabled.

    Obvious, right? Well, if you are working with an update to an existing account, the device will still treat it as an App Store-installed app.

    Delete it, then transfer it again. It should work now :)

  7. Hi!

    Another case: If the “Product Name” in your build settings under section “Packaging” does not match the name of the application in iTunes connect it does not work either!
    (Another day in my live i will never get back…)

    Regards,
    Anton

  8. I have created an app for testing in app purchase according to the documentation provided by apple and other sites and ok with everything.
    And Each of these questions answer is yes but i m still getting invalid product and enable to recognize reason for the mistake.
    * Have you enabled In-App Purchases for your App ID?
    * Have you checked Cleared for Sale for your product?
    * Have you submitted (and optionally rejected) your application binary?
    * Does your project’s .plist Bundle ID match your App ID?
    * Have you generated and installed a new provisioning profile for the new App ID?
    * Have you configured your project to code sign using this new provisioning profile?
    * Are you building for iPhone OS 3.0 or above?
    * Are you using the full product ID when when making an SKProductRequest?
    * Have you waited several hours since adding your product to iTunes Connect?
    * Are your bank details active on iTunes Connect? (via Mark)
    can anyone tell me what it can be?
    or any help from anyone regard this. I will be very thankful.
    one thing which may be the reason is that my bundle id is com.octamac.AppPurchase and product id is com.octamac.AppPurchase.3KT78HR and product name is BookApp.
    is this a reason of getting invalid product id?
    please help me.
    Thanks….

  9. Very enjoyed this! Well done!

  10. Great information! I’ve been looking for something like this for a while now. Thanks!

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

    Have you checked Cleared for Sale for your product? It’s Cleared for Sale and Pending Developer Approval

    Have you submitted (and optionally rejected) your application binary? My App is now “In Review”

    Does your project’s .plist Bundle ID match your App ID? Proviosioning Portal, APP ID: M7572N7T45.com.mobilecom.AAAA. iTunes Connect, Bundle ID: com.mobilecom.AAAA, productID: com.mobilecom.BBBB. Plist file, Bundle ID: com.mobilecom.AAA

    Have you generated and installed a new provisioning profile for the new App ID? Absolutely, Distribution Provisioning Profile, btw

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

    Are you building for iPhone OS 3.0 or above? 3.0 to be precise

    Are you using the full product ID when when making an SKProductRequest? Im using the product ID I see in iTunes Connect: com.mobilecom.BBBB

    Have you waited several hours since adding your product to iTunes Connect? 24 hours already, should I wait longer?

    Are your bank details active on iTunes Connect? I activated the yesterday and a green tick appears since then.

    Im building for distribution. The only things that come into my mind is to Approve the InApp Purchase (Ive read that it’s not necessary) or to wait longer than 24 hours since I created the InApp Purchase.

    Any other suggestion?

    Thanks.

  12. Hi everyone,
    I did not find any problem so I decided to ask a friend’s developer license to set up all the thing. It worked at the very first try. The only problem that comes to my mind is that my bank info is not properly configured (although it has the green tick).

    Anyway, I can guarantee 100% that is not necessary to Build the app in distribution mode nor upload any binary to iTunes Connect. Trust me, Ive been trying all the suggestions that appear in this post as well as many others.

  13. Ur post was good..
    i have a problem, i have submitted two apps for in app and done all the works. now i’m getting one id as valid and another one as invalid product id..
    i have waited for 3 day after submitting…
    so please give the instruction like procedure for creation of app id, bundle id and how to create in-app with example….
    Please Help me..
    Thanks in Advance

  14. Great post

    i have test all points but …

    the last point for me
    > Delete Application on iPhone

    for me, its resolve my problem

  15. Hi there,

    After being able to answer ‘Yes’ to all of those it still wasn’t working. I hadn’t cleared the app off my device for a while (even before I started using a different app ID, provisioning, etc). I deleted it, and then tried to re-install it. Had a ‘failed to upload’ error (possibly because I fat fingered the build button and hit it twice). A reboot of XCode and a redeploy and the product info started coming in.

    I’m not convinced deleting the app off the device and redeploying fixed it, but it could be just another one of those “it can’t hurt to try” cases. It may have well been one of those “wait until it propagates” things, but I had created the product yesterday morning. *shrug*

    Thanks for the list though!

  16. Deleting the app from the iPhone (and then reinstalling it using Xcode) did the trick for me, after all else had failed (and all hope had been lost :) ). Many thanks to Hector for his comment above!

    That tip should definitely be added to the main list…

  17. WTF! 16 hours trying all kind of things to get rid of the “invalid product” thing and all I had to do was to delete the app from my iPhone and reinstall from Xcode.

    THANKS JOE!!!

  18. I want to second everyone who says this is an awesome list. I also want to second HK. I need to use the same Product ID in iTunes Connect and in my code. You can stop laughing now, it took me many, many hours to figure that out. I was under the impression that, in the code, I should prepend the Product ID with my bundle identifier. Now I think the real solution is for me to make proper Product IDs =)

  19. Was getting the dreaded “invalid product id”, I was doing two things wrong, I was using the product name ( reference name ) and not the actual numerical id. After succeeding with the actual product id, I tried with the product name and that did not work, ALSO, I had to use JUST the product id and removed the “com.company.product.” prefix. I have no clue how it worked for those of you who used that convention. And just in case it helps someone, I had the product id wrong but thought it might be because I had rejected my binary submission, then I re uploaded and left it open for review last night and my successful attempts were with it open. Gonna try rejecting it now and try again.

    Hope this helps

    BTW, thanks x 1,000,000 for this walkthrough and the other one, it was a life saver, I probably had 10 things I was doing wrong before finding this… Apple needs to be a bit more detailed with this type of thing, they should actually pay attention to the issues people are reporting and spend some time clarifying those areas.

  20. Ahhhhhhhhhhh! Ok, it is not just bank details. Tax, Bank and everything else has to be filled. And more important: CONTRACTS HAVE TO BE IN EFFECT. After one full week trying everything I was able to get this working. Holy Crap !!!!

  21. I must follow up to my last comment because I’m sure this will help some people. You MUST request the product information at least one time (using SKProductsRequest) before you attempt to make a purchase, EVEN IF you already know the product’s ID. However, once you request the product information once and receive it, you don’t have to do it again unless you uninstall the app.

    To put it more precisely:

    Once per installation of the app, you must have received a

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

    call from an SKProductsRequest, with an entry that matches the product you wish to purchase, before you can try to purchase the product using an SKPayment.

  22. Paul, about: “I had to use JUST the product id and removed the “com.company.product.” prefix. I have no clue how it worked for those of you who used that convention”.

    I think it is that you must use that convention consistently. If you use it when registering the product then you must use it from your code. If not, then you should not. Using it when registering your product is just a convention. A useful convention, I’d say.

  23. I had a lot of good data in my app that I didn’t want to delete. But I finally deleted it and that made the product request work. Fortunately, I found that if I then restored my app from its backup using iTunes, my app data was restored but the product request still worked. So I recommend syncing your device, then deleting your app, then reinstalling and testing your app, then restoring your device from its backup if you want your app data back.

  24. I’m still muddling through this process, and I really appreciate these posts and a lot of the comments. I’m pretty certain that some of you are confusing the reverse DNS product ID convention (which is a good idea) with having to prepend your app ID to your product ID (which is not a requirement, and will not work at all).

    To put it simply, if your in-app purchase ID in iTunes Connect is:

    com.yourcompany.yourapp.inapppurchase

    …then you must request it from your app as:

    com.yourcompany.yourapp.inapppurchase

    If your in-app purchase ID in iTunes Connect is:

    inapppurchase

    …then you must request it from your app as:

    inapppurchase

  25. So, I finally got this working. Deleting and re-installing the app was the very last thing I needed to do. Before that, I’m pretty sure the following things were necessary:

    1. As pointed out by Sergio Oliveira Jr., your contract has to be in effect. This means all information has to be filled out, and the contract has to be processed (this took less than an hour for us). You’ll know it’s in effect when it appears down with your free apps contract.

    2. Creating and clearing your purchase item for sale might not be enough. I also approved it so that it went from “awaiting developer approval” to “developer approved”. When you click Approve, you should click “submit with binary”, which will automatically submit the in-app purchase with the next binary you upload, preventing the purchase from being available right away.

  26. deleting and reinstalling the app on device did the trick for me.

  27. For some strange reason I get invalid product id only when upgrading from a previous version. If installing fresh, it works perfectly fine.

    Why would this be the case?

  28. Hi guys,

    I have tried absolutely everything suggested here and in the forums and am still getting an invalid product id. It is driving me insane.

    One thing I can no longer find is how do I approve in app purchases? I can t see any way to make it ‘developer approved’. Has the ITC interface changed? Are there other rules now?

    Cheers,
    Alex

  29. Had this problem. Tried absolutely everything, EVERYTHING. My problem: The device was jailbroken with cydia. Restored in iTunes and worked perfectly…sweet!

  30. Many of these comments contradict each other.

    Remember, it takes a few hours to get it to work (but no more than 24 hours); because of this, people may do some superstitious behavior and incorrectly believe that it fixed the problem.

    Don’t believe everything you read!

  31. The problem was that it needed only the product id and not the whole com.companyname.appname.productid

  32. [...] in your console window. However, you are more than likely getting back an invalid product ID. My next post addresses exactly how to go about debugging this problem, but the very next section may in fact [...]

  33. Jailbreaking was the problem. I did EVERYTHING on the article above but nothing worked EXCEPT returning to the before-jailbroken state.

  34. I had to quit XCode after all the changes, and then it finally worked. Hope this helps someone.

  35. Thanks a lot ! The last trick worked for me : deleting manually then running the application via XCode.

  36. Could you please add “Jailbroken devices with AppSync installed” to the list?

  37. Guys,

    One more thing to add – the device most likely must not be jailbroken. I had the issue until I reverted the jailbreak.

  38. Oh, I see the one of the previous posters already mentioned the jailbreak. Anyway, please add this to the post.

  39. You have shed a ray of sunshine into the forum. Tahkns!

  40. [...] Apple doesn’t provide any explanation when a product id comes back as invalid, and there are plenty of reasons for this to [...]

  41. Jailbroken device is not able to test out in app purchase!

  42. Thank you for this great list.

    However I am still concerned about the success by deleting existing app and installing new version.
    It surely works fine to me, too. But my app has user’s data in its Document, and it’s awful if they have to remove the app before update.

    I have tried installing the current version using Xcode, not from iTunes, and, after that, installing new one using Xcode, but I also failed to get valid products. So it’s hard to think that it is the current version linked to iTunes. There must be something else. But I don’t know what it is.

    Does anyone get through this kind of problem?

  43. I also encountered invalid prodcut Id problem. I finally updated the iphone iOS version from 4.3.2 to latest (4.3.3), and every product becomes valid !

  44. yes the JAILBREAK WAS THE ONE!

    i’m so glad I went through all the comments! I was on this for more than a week!!!

    Please add the jailbreak to the list!

    kudos for the list!

  45. Thanks mark,

    i had same problem as you have described(“”Are your bank details active on iTunes Connect?”).
    it’s help me a lot…

  46. [...] After keep getting invalid product ID’s I went through the following list: [...]

  47. Great hints. That really helped me solve my problem. I did not setup the bank account information and I got the error messages says Invalid product ID. Once I setup the bank account, it is ok. But I still have other problems I could not make iap work yet.

  48. Something that might be made clearer: when you’re adding Product ID on iTunes Connect, you need to specify the FULL product ID. I always assumed code would be ‘com.company.appname.productid’, and you would just enter the productid portion in ITC; instead, add the full thing in iTunes Connect.

    This site is the most useful thing ever created, by the way.

  49. After waiting about 10 hours my products were still returning invalid. Deleting the app off my phone and reinstalling it via xcode’s “RUN” command returned valid products! Thank you so much!

  50. Can I just add one thing to your list please?

    When you create the in app purchase product, MAKE SURE you only use numbers and digits as the ? sign next to it says. I have wasted ONE WHOLE WEEEEEEEK!

    your article rocks, but that was where I was held

    best

1 2 3 4

Leave a Reply