iOS: Pre Setup Before Testing In App Purchases

Before In-App purchases can be tested on a device there are a number of things that have to be done. Below is a list of Prerequisites

Important Prerequisites:

  • You must create a provisioning profile with In-App Purchases turned on
  • You must setup all tax documents before you can test In-App Purchases (W9, Bank Account, & Sign Agreement)
  • You must make sure your bundle id matches exactly in the GBs publish settings as the one you setup in iTunes Connect for the app

Creating An In-App Purchase Enabled App ID

Creating An In-App Purchase Enabled App ID

Before you can use the iOS In-App Purchase extension, you'll need to set up an App ID on Apple's developer website. Go to https://developer.apple.com/devcenter/ios/index.action and login with your Apple developer account. If you don't have an account yet you will need to register as an iOS developer and pay the $99 a year fee to apple.

Once logged in go to the Certificates, Identifiers & Profiles section to setup an App ID. Click the App IDs section and click the plus icon at the top to create a unique App Id. This id will be used to recognize your application and register all purchases made in your app to this id. This will also be used when we create the provisioning profile later. Fill in the name, and Bundle ID correctly. Normally a bundle id follows the reverse-domain name style (i.e. "com.gbs.TestIAP"). Select the services that will be used. In this case make sure In-App Purchase is selected. If you incorporate any other services in the future this is where it will need to be enabled.

**Note: DO NOT use a Wildcard App ID here. Make sure it is an explicit id. Take note of the Bundle Id because it will be required when filling out the publish settings inside of GameBuilder Studio.

Creating A Provisioning Profile

Creating A Provisioning Profile

Now go to the Provisioning Profile section. You should create at least two custom provisioning profiles for the application that you will be enabling for in-app purchases. One profile will be used for development and testing, and the other for distribution to the App Store.

Click the Development tab and then click the plus icon to create a New Profile. Fill out the Profile Name, type a descriptive name, such as yourappname dev provision. For Certificates, be sure your own certificate is selected. If you don't have a certificate setup create one first. For App ID, select the App ID you just created. For Devices, select all the devices on which you want to test.

Click Submit. When the Provisioning Portal finishes creating the profile (you may have to refresh the page if it says pending), download the provisioning file and save it to your disk. You'll need it later to test your game.

Contract Acceptance and Tax Document Setup

Contract Acceptance and Tax Document Setup

Go back to the main iOS Dev center screen to get to Contracts, Tax, and Banking section. You will need to make sure that you submit any required tax documents and agree to the Apple contract terms before In-App purchases will work on your device. Will need to print out a W9 tax document fill it out and re-upload it to the site. Yes you have to do all of this before even testing on your device. It is the wonderful process of iOS development.

**Note: You CAN NOT test in-app purchases from the apple developer account you are currently setting everything up under. You will need to add test users and switch the main logged in apple account on your device when testing on your device. More on this later.

Application Setup

Application Setup

Now its time to setup a new application. If you've already added your app in iTunes Connect, skip the following and go directly to the "Setting Up Purchasable Products in iTunes Connect" of this guide.

Go back to the iTunes Connect page and click on Manage Your Apps. Look for the Add New App button at the top left hand corner of the page. Fill out all the required information like name, SKU number and make sure to select the Bundle ID that you just setup when creating your App ID.

Click Continue. Finish setting up the rest of the basic information for your new app, including the release date, pricing tier, version information, rating information, metadata, icons, screenshots, and other required data. If you're just creating a test app, you can set the release date far in the future. At least one screenshot and icon are required to register an application.

Once you have created your application you should see a Manage In-App Purchases button on the right side of the app information page. If you do not see this button something is probably not setup correctly. Or maybe your contract information has not be processed yet.


Next In This Series...


Follow Us For Updates