Manage In-App Purchases
First of all, you need to create In-App purchases for you app.
- Sing into the iTunesConnect
- Choose My Apps category
- Open an app you want to create InApp products for (or create an app, if you haven't done it before)
- Add products for your application under the Features tab as shown on the screenshot bellow
Make sure that you have uploaded a screenshot for each in-app product, and all of them have Ready to Submit status. The Product ID column displays the id of your product. You will manage your products in code using these id's. But before you can test your products, you need to enable it for your app version.
- Go back to the App Stoe tab.
- Choose your current App version
- Scroll down to the In-App Purchases menu
- Enable In-App products for your app version, as showed on a screenshot bellow.
Adding test user
To be able to Test In-Apps you have to create test account and log out from your real account on your device.
Go back to the iTunes Connect main page. Then Manage Users → Test User. Fill all required fields and create new test user.
Make sure that you sign out from your real account before testing in-apps on device.
To do that open device setting, select iTunes & App Store, tab on your account and press Sign Out button.
Warning: Do not try to sign in as test user. Use your test user id and pass when your game asks for it.
Warning: You MUST specify a valid email address on account creation to verify with apple. Otherwise, iCloud denies you access by having the ubiquity identity token always null. IAP though, for some reason, works just fine with an unverified address.