Not really programming, but if you want to set up in app purchases you will have to go through this.
Wrote this up for a Unity plugin I made. I figured it may be useful if anyone is trying to make In App Purchases. It is a bit of a finicky and there is basically no proper tutorials of the entire process.
StoreKit for iOS and PlayMaker
Thank you for purchasing StoreKit for iOS and PlayMaker! You have now completed the first step in making your game profitable! This guide will help you setup your project so that you may run the Example scene and get started.
Setting up In App Purchases can be a complicated and frustrating proccess. This is a in depth guide indented to take the guess work out of the setup. If you recieve a error please make sure that you have followed each step properly.
This guide will show you how to setup your purchases. It will not show you how to create a Apple App. It is expected for you to have one already if you have gotten to this step. There is many guides available if this is not the case.
Before we get started I want to address some common pitfalls. These are the steps that I personally ran into problems with. Hopefully me bringing them up here can save you some time.
Tax Information is not Setup
I am still not 100% sure on this one, but i believe that I could not get any of my In App Purchases to work until my tax information was set up in Itunes Connect. This can be done at any time, but i suggest doing it early as it can sometimes take a day or two or complete depending on country.
Not using test user
When testing In App Purchases you must use a test user that you setup in Itunes Connect. Your normal account will not work. You must sign out of your normal account in your device settings. Then when prompted to login use your Test user account.
Screenshot not Uploaded
After you have created your In App Purchase in Itunes Connect your good to go right? Well not so much. Make sure that you have uploaded a picture for review at the bottom of the page. If you do not have a picture ready just upload a random one that meets the size requirments. You can always change it later. For the purchase to work it must say Ready to Submit. You do not need to actually submit the purchase.
Lets Get Started!
Step 1: Contracts, Tax, and Banking Information
Before your In App Purchases will work you must set up your tax information. I can not provide a full walkthrough of this proccess as it is differant for each country. Being a member of Canada it is not that benefical to show you the proccess as I believe the US one is much shorter.
Goto: https://itunesconnect.apple.com and log in.
Click on Contracts, Tax, and Banking
You must have a Paid Applications Contract for iOS. I cannot guide you through the rest of this as it is differant per country.
It should look something like this when completed.
Step 2: Setup Provisioning Profiles
If you have not done any In App Purchases before there is a good chance you are using a wildcard provision profile. This will work with any app and is handy to get things running. For In App Purchases however you must have a unique ID.
For example, use com.example.MyGreatApplication rather than com.example.*.
Goto: https://developer.apple.com and click on Certificates Identifiers & Profiles
Click on App Ids and then the plus button on the top right hand side.
Fill in the required information. Make sure you select Explicit App ID and not wildcard.
Make sure that In App Purchases is also selected.
When you are done hit Continue. Make a Development provision profile with this App ID.
Step 3: Setup Test Accounts
Goto: https://itunesconnect.apple.com and click on Manage Users.
Select Test User
Click Add New User and fill out the relevant info.
This is now your test account. This must be used to test all In App Purchases. Real Apple accounts will not work until your application is live.
Step 4: Create In App Purchases
Click on Your App. If you do not have one create one now.
Click On Manage In App Purchases
Hit Create New
Select Consumable Or Non Consumable Product based on what you want to make
Fill in all the required info
Hit Add Language and Fill in the relevant info
Upload a screenshot and hit Save.
Check out the test scene to get started! It is full valuable information.