views:

2245

answers:

14

Hello,

I am getting zero product identifiers from SKProductsRequest

I did the following steps

a) created a In App Purchase Test User account under 'Manage Users' in iTunes Connect

b) created some in app purchase products under 'Manage Your In App Purchases'.

c) Loaded the app onto the iPhone, went to Settings->Store and logged out of the regular store

d) set a breakpoint in the (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response callback

All the submitted Product ID's are in the response.invalidProductIdentifiers category. When submitting the request I use either the Product ID's used under b) directly or I tried to prefix them with the Bundle ID:

Thanks In Adavance

Raghu,

+1  A: 

Hello,

I'm in the same case.

To test "In App Purchase" functionality, I've first created a new test application signed with the provisionning profile of a paid application. The trouble is that all products available in the "In App Purchase" are considered as invalidProducts. I checked many times there is no misspelled errors, the checkbox "Cleared for sale" is checked and the Bundle ID provided in iTunes Connect interface is matching with the Bundle ID of the test application. But when requesting for retrieving "In App Purchase" products informations, all available products aren't valid. Moreover, I'm never prompted for "In App Purchase test user" login and password and there is no account in "Settings -> Store" menu logged in on the iPhone. When displaying 'localizedDescription' of NSError class, just before the transaction fails, I have the message : "Connection to iTunes Connect is impossible".

If someone thinks to have a solution or an advice, thanks to tell me.

nyu
+2  A: 

Did u log out of the AppStore from Settings.app? Only when u log out, you will be prompted for logging in again.

Is In-App purchases enabled for your App ID? App ID with wild card (*) cannot be enabled for In-App Purchases. For your app, you should create a new App ID.

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

Mugunth Kumar
A: 

I am having the exxxact same problem. Did you solve this? I am not even being asked to login as my test user. I just get 0 products from the response.

Thanks

aryaxt
Please up-vote the question rather than adding "me too" "answers."
Stephen Darlington
+1  A: 

Make sure your "Product Name" in xcode is the same as the app submitted to iTunes Connect.

+1  A: 

The contract for paid applications must be in effect in order to receive data about the in app purchases configured.

This worked for me. I had the exact same problem.

masone
A: 

I'd like to add the like @masone, I believe my initial issues with in-app purchases were related to the client not having completed the Paid Applications contract

Cirrostratus
A: 

Is your In App Purchase "Cleared for Sale"? That's the setting that I didn't check first time.

Stephen Darlington
A: 

Setting the Product Name to the same name submitted to iTunes Connect solved it for me.

aegzorz
A: 

I've been compiling a list of the reasons product identifiers come back invalid. Here's a checklist of the potential causes:

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

Troy Brant
+2  A: 

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 :)

Hector Ramos
+1  A: 

Hi all, I'm one the the victims here. Well, I was. Yesterday, I had the problem and revised a lot of times all the steps. Today, I reviewed all the list from troybrant.

1) ok my mistake, I forgot to create the proper distribution profile:fixed

2) uploaded a binary and rejected immediatly: they say it works better than no uploading

3) ok, other fix: removed the 10 digits before my domain name from everywhere in xcode (XXXXXXXXXX.com.company.app to com.company.app)

Still not working.

4) Check my device not to be connected with an itunes account.

5) Clean build everytime and remove app from device sometimes

Still not working.

6) Finally, when asking for products, I used only the productID, not the whole com.company.app.productID.

AND it worked.

I think sometimes we have more than 1 mistakes, and when you correct all of them, it's hard to know what was exactly the cause of the problem.

Now I'm happy

LRM
A: 

Signing contracts for Paid Apps solved all my problems. Thanks. !

Reetu
A: 

After struggling for a day or so with invalid products being returned, my solution came down to making sure the purchase item was "Developer approved for sale". Even though there was a green mark next to the item saying "cleared for sale", I still needed to upload a screenshot and select approve.

This seems like a backwards and illogical way of doing things considering I'm still testing my app and not yet ready to put it on sale.

jumponadoughnut