Unity IAP
Configuring for Apple App Store and Mac App Store

Setting up Unity IAP

To get started with Unity IAP, you must first link your game to a Unity Services Project ID. A Unity Services Project ID is an online identifier which is used across all Unity Services (Ads, Multiuser, Analytics, etc). These can be created within the services window itself, or online on the Unity Services website. The simplest way is to use the Services window within Unity, as follows:

Step 1. Link your project with a Unity Services Project ID.

The Services window
The Services window

Open the Services Window by going to Window > Unity Services, or click the cloud button in the toolbar.

This offers you the option to create a new Project ID or select an existing one.

If this is the first time you are connecting your project to Unity Services, you’ll need to create a new Project ID. The organization is typically your company name. The project name for the new Services ID will automatically be taken from the name of the Unity Project you’re currently working on.

Names for new Unity Services Project IDs are automatically picked from the project’s name; however, you can change the name later in the Settings section of the Services window.

Creating a new Unity Services Project ID
Creating a new Unity Services Project ID

If you have already set up a Unity Services Project ID for this project, simply select the organisation and project name from your list of existing projects. You may have already set up a Unity Services Project ID if you have used one of the other Unity services with this project already, such as Unity Analytics, Multiplayer, Ads, or Cloud Build.

Selecting an existing project
Selecting an existing project

Step 2. Enable In-App Purchasing

In the Services window, select In-App Purchasing.

Click the Enable button to enable In-App Purchasing.

Step 3. COPPA Compliance

The Children’s Online Privacy Protection Act (COPPA) applies to the online collection of personal information from children under 13. The rules spell out what you must include in a privacy policy, when and how to seek verifiable consent from a parent, and what responsibilities you have to protect children’s privacy and safety online. If you have not already specified a COPPA choice in your Analytics settings, a dialog window will appear asking about the target age for users of your app in order to ensure COPPA compliance. Choose the appropriate answer and then click Save Changes.

The COPPA Compliance target age prompt
The COPPA Compliance target age prompt

Step 4. Adding the IAP package

To import the Unity IAP package into your project, click Import.

The IAP Import Package option
The IAP Import Package option

When you import the package, a new folder called Plugins is automatically added to your project. This folder contains UnityPurchasing assets required to use Unity IAP.

The imported IAP package files in the project window
The imported IAP package files in the project window

Click Back to services to review the Services panel.

The Services window back button
The Services window back button

Make sure that that Analytics and In-App Purchasing are both labelled ON as shown below.

Services window showing IAP and Analytics switched on
Services window showing IAP and Analytics switched on

You can now begin implementing Unity In-App Purchases in your project.

Unity IAP
Configuring for Apple App Store and Mac App Store