Skip to main content

iOS App Store

This guide explains how to create and configure in-app purchases in App Store Connect.

Register developer account

Enroll in the Apple Developer Program. Please note the difference in requirements for individuals or organizations. There is a $99 yearly membership fee to be a publisher on the App Store.

Having issues in the registration process? Please see this page on Apple’s support pages.

Next, go to App Store Connect and accept the paid contracts listed under the Agreements, Tax and Banking section. Agreeing to these contracts is required in order to sell apps or in-app purchases.

Apple-Setup010

Apple-Setup020

After requesting and confirming the contract, you will have to edit its Contact, Bank and Tax Info for it to get reviewed by Apple.

Create your app in App Store Connect

In this step we will setup necessary certificates for your account and create a new app in App Store Connect with in-app purchases.

Create Certificates, App IDs & Provisioning Profiles

To build your app in Xcode and publish it to the App Store later on, you will need to create certificates and provisioning profiles. This is a great resource with step-by-step instructions (follow section 2 only). You can also try to use the automatic signing in XCode later on, but you might run into issues doing so.

Create app

In App Store Connect, open the My Apps section and add a new iOS app.

Apple-Setup030

On the next window, fill out the required information about your app, such as its name, primary language and bundle ID (follow the link to create one if you haven't already).

Apple-Setup040

Create in-app purchases

Add a new product in the In-App Purchases section under Features.

You will see a list of available purchase types – consumables or non-consumables. Subscription have their own page in the sidebar, where you can define groups with renewing subscriptions or separate, non-renewing subscriptions. Read each description carefully if you are unsure about the type you need. Make sure the information selected here matches with your product details entered in Simple IAP System's Project Settings editor. You will not be able to change the type or identifier of a product afterwards. Make sure that your In App Purchases are in the Ready to Submit status for testing. As a review screenshot, you can use any template and upload a real one later on.

Apple-Setup050

Apple-Setup060

Add test accounts

In the Users and Access section, switch to the Sandbox tab and add a new tester entry. You don't have to add an email address which really exists, but you have to remember its login information. If you add multiple testers with different country settings, you can even test your in-app purchases in several store languages.

Apple-Setup070

iOS deployment in Unity

Here we will prepare our application in Unity for the iOS platform.

Enter bundle identifier

Switch to the iOS platform File > Build Setting and open the Unity settings for iOS by pressing Player Settings.

Apple-Setup080

In the Other Settings section, change the bundle identifier to the one you have created on App Store Connect. Make sure it matches exactly.

Apple-Setup090

Apple-Setup100

Check bundle version

The bundle version in the Unity settings for iOS will default to 1.0 for new apps, which is fine for now. If you’ve published an app on App Store Connect already, replace this with its associated version number from the iOS App build section.

Build app

First, enable Development Build under File > Build Settings. This enables log messages sent by Simple IAP System on your device for debug purposes. Don't forget to disable Development Build for your live apps. Next, if you would like to view the sample shop scenes included in SIS, add them to the build. Then deploy your app to Xcode by pressing Build (on a Mac). After the project export has finished, open the produced *.xproj file with the latest version of Xcode.

Apple-Setup110

Apple-Setup120

In Xcode, check that the StoreKit framework has been added correctly in the Frameworks section on the General tab. If Storekit is not to be found, add it manually by clicking on the plus symbol.

Apple-Setup130

Testing IAPs on your device

Before deploying the app on your device, open its settings and sign out with your Apple ID. This is necessary to receive the login popup later, when doing a test purchase.

Apple-Setup140

Press Run in Xcode to deploy and start the application on your connected iOS device. If you have changed values in the Project Settings editor of Simple IAP System, you need to uninstall your app from the device before building and deploying it via Xcode again. A message should show up, indicating that the build has succeeded. In case your build fails, you most likely have errors in your plugin dependencies to solve.

Apple-Setup150

When the app has started on your device, enter your shop scene and try to purchase a product. Log in with your sandbox test account details when prompted. If it does not prompt for your Apple ID, check if you are really signed out in device settings.

Apple-Setup160

caution

Apple will reject your app if you don't provide a way for users to restore their transactions. Keep a button with the UIButtonRestore component in your shop and Simple IAP System will handle everything else for you (see sample scenes).

Unsolved Errors

If you can’t see any products or if the purchase popup does not show up at all, you may have some issues with your Unity/App Store settings and/or errors on the device. Please verify that all of the following points have been met:

  • app bundle identifier in Unity matches the app identifier in App Store Connect
  • in-app product identifiers in the Simple IAP System Project Settings matches the IAP identifiers created in App Store Connect
  • you have added sandbox test user accounts in App Store Connect
  • in App Store Connect, your Contract, Tax & Banking agreements are confirmed active
  • you are logged in with a App Store sandbox test user account on the device

Still having issues?

Please have a look at the device log in XCode for potential errors showing up.

Apple-Setup170

info

Please note that in case of issues with this process, I am not able to guess or remotely debug the exact cause for you. Since a major part of this guide is not written for Simple IAP System in particular, there is a high chance that your issue has been experienced by many, many other developers before and is covered somewhere already - debug your device, do a Google search for the error message and look out for popular iOS developer or Unity IAP threads!

tip

If you need help with the app setup, testing process or solving issues with your app's connection to Apple App Store, I am providing extended support for this via a PREMIUM support purchase.