IPhone StoreKit - Invalid Product ID

I am trying to test in app purchase in sandbox environment.

To check the code, I did the following:

  • Created Application Purchase Verification user account under "User Management" in iTunes Connect

  • Created some of the products for the purchase of applications in the section "Manage purchases in applications." I used numeric values ​​and alpha numeric values ​​for product identifiers.

  • After downloading the application on the iPhone, go to Settings-> Save and exit the normal storage and into the test account created in step 1

  • Set a breakpoint in ( void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response Callback

All provided product identifiers are in the response.invalidProductIdentifiers property. When sending the request, I first tried the exact product identifiers created during step 2. I also tried prefixing them with the Bundle identifier:

 NSString *id2 = @"com.super.duper.8"; NSSet *productList = [NSSet setWithObjects:id2, @"8", nil]; SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:productList]; 

Am I missing something obvious? Any help is appreciated.

Achim

+32
iphone storekit
Jun 25 '09 at 0:42
source share
22 answers

If you still get invalid product identifiers, I have accumulated a checklist of all the various reasons:

http://troybrant.net/blog/2010/01/invalid-product-ids/

+53
Feb 07 '10 at 21:53
source share
— -

I spent two days fighting all my products. Request (for AppID) ended up in the response.invalidProductIdentifiers list, and not in the response.products list. Apple definitely did a Class F job with their storekit. It is confusing, interwoven and complicated.

I finally resolved this. One very important lesson that I learned, as indicated by several on the forums: it may take many hours for what you entered on itunesconnect.apple.com to influence.

There are two parts to xcode: the name of the application and the AppID, as well as what you entered in itunesconnection, they must match exactly (case sensitive). If you registered or made changes to the AppleID application (I also completed all my contracts and banking information, as suggested by some of them that the purchase actions will not work without completing this part), you can also go to bed before testing it again because actually it takes a few hours for my solution. I was so upset fighting this issue before my nine-year-old dragged me to bed and then was surprised to see that the problem disappeared when I woke up.

I found Eddy71's suggestions at http://www.iphonedevsdk.com/forum/iphone-sdk-development/21035-problems-creating-test-user-app-purchase.html really useful. Before resolving this, I did everything I could on the Eddy checklist, and still got zero products. One of my fears was that without adding binary code to complete the registration of the application in itunesconnect it was normal (there is no need to live live, as described in http://blog.mugunthkumar.com/coding/iphone-tutorial-%E2%80 % 93-in-app-purchases / ). This is really normal. Make sure that "peeled for sale" is checked and the icon is green (you need to take an additional step to approve it after filling out the form). Another fear was that I could use a preliminary preliminary version of the developer (not temporary) in debug mode, which is also really normal. Hope this helps some of you. Good luck and faith. He will work eventually.

+15
Jan 23
source share

Our question was the last item on the Apple FAQ: " Why are my product identifiers returned to the invalidProductIdentifiers array invalidProductIdentifiers

  • You have not fulfilled all financial requirements (see the section "Contracts, Tax and Banking Information" of this document).
  • You did not use an explicit application identifier.
  • You have not used the Provisioning Profile associated with your explicit application identifier.
  • You have not used the correct product code in your code. See Technical Questions Q & A, QA1329, “In Product Identifiers for App Purchases” for more information on product identifiers.
  • You have not cleared your products to purchase apps on iTunes Connect.
  • You may have changed your products, but these changes are not yet available for all App Store servers.
  • If you or App Review rejected your last binary in iTunes Connect.

I changed the most recent version (which was rejected) to “Pending Download” by clicking “Finish to Download Binary Files” in iTunes Connect, and the problem was resolved after about 10 minutes.

+7
Dec 08 '11 at 1:18
source share

OK, the phone is hacked, you just have to remove appSync in Cydia, then it works

+5
Apr 08 2018-12-12T00:
source share

As a result, we created a new preparation profile, somewhere there was a line (I can’t remember where, and not in the documents for purchasing the application), which indicates what you should include in the purchase of the application in the preparation profile. We could not do this with our existing profile, so we created a new one and then we can enable it.

+3
Oct 08 '09 at 22:51
source share

Try resetting iphone settings and uninstalling application from iphone and use request product id directly without package id

+3
Apr 18 '11 at 7:10
source share

Apple has a fantastic document that is not well known that covers this at the end. It also dispels some myths about things that don't help (for example, send binaries).

Technote 2259 "Adding a purchase to applications for iOS and Mac applications"

+3
May 17 '12 at 19:27
source share

For anyone with these issues, I highly recommend reading this thread on the Apple forum.

+2
Oct 30 '09 at 6:50
source share

I tried everything that was offered on the Apple forums, and here, and still could not get it to work. Solution found - your application must be passed to Xcode to include the sandbox.

Obviously yes? Well, if you are working with updating an existing application, the device will still consider it as an application installed in the App Store.

So, uninstall the application from your device. Then install the application back to the device using the Build and Run function with the device connected to your computer. Now it should work :)

+2
Apr 30 2018-10-10T00:
source share

Here you are mistaken, you need this in your code:

NSSet *productList = [NSSet setWithObjects:product id]

You can get this product identifier from iTunes connect.

And you need to make sure you create a test user and log out of your original iTunes account. Please do not log in to the test user account no matter what the Apple documentation says, just use it when a popup appears.

+1
Jul 17 '09 at 16:09
source share

What is @ "8" for? Your product is named as com.super.duper.8 correctly?

http://blog.mugunthkumar.com/coding/iphone-tutorial-%e2%80%93-in-app-purchases/

+1
Oct 21 '09 at 2:14
source share

Another problem I ran into was that I needed to go to Window> Organizer in Xcode and delete my application and provisioning profiles and re-add the development profile. I restarted the device and xcode as an extra measure.

+1
Nov 11 '10 at 20:52
source share

I tried every solution available on the Internet and nothing worked, absolutely nothing. My problem: my device was hacked and it had Cydia on it. I restored the device to the factory by default (Not jailbroken), and it worked for the first time and returned the product identifier without any problems.

+1
Apr 28 '11 at 21:30
source share

For me, the problem was that I selected “Enable content hosting” when setting up an In-App purchase. So I had to turn it off and the problem was resolved.

+1
Nov 05 '16 at 3:50
source share

In my case, I did not fill out the bank information, tax information and contact information. When I finish this, I can get my product id, hope this helps someone.

+1
Jun 15 '17 at 1:36 on
source share

It takes some time to store products on all servers (see the documentation). Thus, you may encounter a delay between the creation of the product in iTunes Connect and the fact that the product ID is valid when testing on the device. For me, it took about 12 hours until my products appeared.

0
Oct 22 '09 at 6:57
source share

Note to others: do not use NSMutableSet for product identifiers. It must be NSSet!

0
Mar 21 '10 at 21:36
source share

If you want to save the data of your application, but want to try deleting your application to fix this problem, first synchronize the device. Then uninstall the application and reinstall it from Xcode - this fixed the problem for me. After it works, you can restore your device from your backup - it will take only a few minutes, and product requests still work after recovery.

0
Jan 17 2018-11-11T00:
source share

It’s not entirely clear why, but when I changed the request product identifier from “com.mycompany.myapp.product” to “product”, it started working. Perhaps this is due to the fact that I have a product configured in iTunes Connect.

Give it a try, may work for some of you ...

0
Dec 01 2018-11-12T00:
source share

replace:

 NSSet *productList = [NSSet setWithObjects:id2, @"8", nil]; 

from:

 NSSet *productList = [NSSet setWithObjects:@"8", nil]; 
0
May 29 '13 at 6:43
source share

Another problem that may be. If the name of your xCode project is not written in English or it has other characters, the package identifier will contain "------", where your application name should be. I thought this was just a convention for the package identifier, for this in xCode. It turns out that this was my problem, so name your project xCode in English) I know that this is not the case for most, but anyway)

0
Feb 27 '15 at 8:45
source share

I tried everything everyone is talking about. First I made a guest account to find out if I can find the product identifier ... It was. So, I started to leave from everything to the activity monitor and found a problem. I had to exit the "store" process below. Suddenly, I stopped receiving an invalid product identifier. Hope someone helps there.

Close them if you get an invalid product id error

0
Dec 17 '15 at 9:50
source share



All Articles