In App Purchase setup and testing

Posts: 129
Joined: 2009.03
Post: #1

I'm trying to setup an in-app purchase in iTunes connect, so I can run test purchases from a sandbox test iTunes account.

In order to do this, do I need to submit the screen-shot? iTunes connect seemed to be asking for this, and also, it seemed to be the case that I would need to upload a binary of my app too! I'm sure that can't be right..

How do I setup a test (in-app purchase) product in iTunes connect?

Any ideas?

Quote this message in a reply
Posts: 455
Joined: 2003.08
Post: #2
You do not need to upload a screenshot or upload a binary. You don't have to mark it as ready until you're submitting, you can just create it. You can also go through the whole app creation process and just not upload a binary until you are ready, and make in-app purchase objects for it. Also keep in mind that (I'm pretty sure) you need to build an Ad-Hoc build to test in-app purchases.
Quote this message in a reply
Posts: 129
Joined: 2009.03
Post: #3
Thanks Alex,

This is turning in to a whole pain in the proverbial, anyhow, just a few more Q's.

re: Setting up Apps to use IAP.

1. Does an App need a unique BundleID or a unique AppID?

2. How come I can create a new app, using a wildcard AppID, and in iTunes connect I am allowed to setup IAP products for it? (I thought IAP Apps need a unique AppID?).

3. Should I use a new unique AppID for each app, that has IAP?

4. I’m thinking of going to university, to study Apples’ whole provisioning system. I imagine it will be a 5 year course. Any recommendations for a good uni?

Seem to be spending more time getting my head around Apples' systems, than actually developming games.
Quote this message in a reply
Posts: 3,591
Joined: 2003.06
Post: #4
Yes, you need to make a unique ID for each app that has IAP. This way you'd have something like com.mycompany.myapp, which will allow you to add a unique product ID for each IAP product like com.mycompany.myapp.myupgrade

It's been quite a long time now since I set up IAP, so this description might be off.

In iTunes Connect, when setting up IAP:

1) The reference name is exactly that; something like: Upgrade 1 or My Upgrade or whatever. The user never sees this.
2) Add the product ID, as mentioned above (e.g. com.mycompany.myapp.myupgrade)
3) Set the type to Non-Consumable. (assuming that's what you're doing)
4) Make certain that "Cleared for Sale" is checked.
5) Add a language. The Displayed Name and description here is what the user actually sees, like "My Fancy Upgrade" (no quotes).
6) There is supposed to be a screenshot of the purchase in action as part of the app approval process. For testing, you can probably just upload a dummy graphic if it really requires it, but for final submission you'll need the real deal.
7) After adding the purchase, there will be a green button in the upper right, to Approve it. Don't approve it yet, until it's been tested.

Testing the in-app purchase:

1) On the main page of iTunes Connect, click on Manage Users
2) Click In App Purchase Test User
3) Add New User
4) Fill out info. This is all mostly fake stuff to fit with their database scheme. Here's what you can try for your USA test user (the user has to be unique, so you can't reuse the email addresses, but I think you can reuse the password):

first: dude
last: testuserthreethousand
pass: asdfgh
question: yeah
answer: space junk
store: usa

5) Cross fingers.
6) Click Done.

If it doesn't go through, try different email addresses.

When you test on the device, be certain that you sign out of your real account in the device settings first. Then you can sign in with the test user. Do not attempt to use the test user for any other purchases and do not use your regular account for testing. Be very careful about this!

As I recall (memory is hazy here), you can test the purchase when deploying to the device from Xcode as a regular development build (i.e. Ad Hoc not required), but as I recall, you'll still need a binary uploaded to iTunes Connect. I think I just uploaded a dummy binary, which was an app that didn't do anything, since no one would be using it, but contained the specific app ID. The real deal is the one on your machine which you're testing in Xcode. When you're finished testing then you can upload that for approval to replace the dummy binary.

Yes, IAP is a super PITA. Best of luck!
Quote this message in a reply
Posts: 129
Joined: 2009.03
Post: #5
Thanks Jake,

Yup, eventually managed to setup some IAP products for a test app; with IDs like:

My test app, receives the SKProductsResponse response OK; and product info is all there (in an array), for: Title, Description, Price etc.

I’m sure I’m using a wild-card AppID though. So, in the Provisioning Portal my AppID is xxxxxxxxxx.* and when I created my test App in iTunes Connect, I add on the com.mycompany.mygame (BundleID) bit.

Then, I’m allowed to create IAP products for the App. Does that all sound ok? I mean, if it’s letting me create IAP products for an App, then it must be okay in terms of using a valid AppID?

Slowly getting there! Smile
Quote this message in a reply
Posts: 3,591
Joined: 2003.06
Post: #6
Yeah, seems like the wildcard would be just fine if it works during testing. They may very well have changed things since I last looked at IAP, or I may have easily misunderstood the docs.
Quote this message in a reply
Posts: 129
Joined: 2009.03
Post: #7
(Jun 24, 2011 08:54 AM)AnotherJake Wrote:  ... or I may have easily misunderstood the docs.

Heh. Well, I'd say that's very easily done! They should be absolutely clear and consistent in their definitions, anything less, just adds to the confusion. For example; AppID consists of BundleSeed + BundleID. They should never refer to the BundleID part (on it's own), as being the AppID.

I'm getting other issues now; on my newer devices, I manage to get the product info back just fine; and also, getting back on an old original gen iPhone. Isn't working for me on a 2nd gen iPod touch though. I'm guessing it may be the fact that it's jail-broken; although the iPhone is too, and that works fine. Also, IAP in other apps, works fine on the jail-broken iPod touch.

Also, the BundleID of my app, is not exactly matching up with the product ID of my IAP products; yet it's still working.

BundleID =
IAP product ID =

IAP product ID should be something like '' I guess.
Quote this message in a reply
Posts: 2
Joined: 2012.01
Post: #8
am having an issue with a game we submitted to iTunes during the holidays right before they closed down - our programmer has not been able to figure out how to fix the IAP bug - we are going NUTS -

is there anyone out here in the forum that may be available to help us figure out how to get it fixed?

really appreciate the assist -

Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  In App Purchase tikamchandrakar 0 3,362 Feb 22, 2012 05:32 AM
Last Post: tikamchandrakar
  In app purchase in games captainfreedom 14 9,854 May 23, 2010 02:37 PM
Last Post: captainfreedom
  testing on iphone vs testing on ipod touch frozen 1 4,522 Oct 8, 2008 04:03 AM
Last Post: monteboyd