After you are done with the achievements, go back to the game app main page. This page is used to show all the public information for the game; the information users will see when the game appears on the store:
If you want to convert a AVI file to a M4V file, you can use a program called HandBrake (https://handbrake.fr/).
At the very top of the page, click on Save.
At the top of the page, click on My Apps, and in the window that pops up, click on Agreements, Tax, and Banking.
On this page, you will have to fill out and accept the contracts for iOS Free Application, iOS Paid Applications, and iAd App Network. The process includes the personal banking information and the identity verification. When you have completed these, the game will be set up to sell and display iAds.
As Unity does not support the native functionality of iOS, we need a plugin to call the native iOS functions from Unity. For example, if we want to provide the user with the in-app purchase, we need this plugin to handle the code that takes care of this.
For our plugin to know about the specifics of our game, we must first include the Apple ID and the Bundle ID.
In Unity, click on Window at the top of the editor screen, navigate to iOS Native, and select Edit Settings.
The Inspector window should update to show iOS Native Settings.
In iTunes Connect, navigate to My Apps and click on your game. This will open the main settings page. About halfway down, you will find the text for Apple ID. This is a big integer value. Copy this and go back to Unity; you can select the text and click on Ctrl + C, or you can write it down.
In iOS Native Settings in Unity, under Apple ID, paste or enter the Apple ID from iTunes Connect:
While still in Unity, click on File in the top-left corner of the editor window. Then, navigate to Build Settings.
If your project is set to PC, Mac & Linux Standalone, click on IOS. In the bottom-left corner of the window, click on Switch Platform.
Next, in the same window, click on Player Settings. This will update the Inspector window. Under Other Settings, find the section under Identification and then the textbox labeled PlayerSettings.bundleIdentifier. In this field, enter the Bundle ID that you set up earlier. I used the reverse-domain name style, such as com.mycompanyname.appname
.
If you do not remember your Bundle ID, navigate to iTunes Connect, select My Apps and then select your game. On the right-hand side of the window, click on More and then About this app. In this window, you will see the game information, including the Bundle ID of the game.
You can leave PlayerSettings.bundleVersion set to 1.0
.
Apple has come a long way when it comes to making the provisions and certificates for games. This used to be a headache, but now, we can use Xcode to generate these for us.
The first step is that you will need to make a build and open it in Xcode. This can be done from your Windows or Macintosh machine, but it has to be opened on your Mac.
To create the build, open Unity and navigate to File in the top-left corner of the editor window. Then, go to Build Settings.
Make sure that the build is iOS and Development Build is checked.
As there is no reason to run this build on a device, you do not have to have a scene selected in the Scenes in build window.
Open Player Settings and make sure that PlayerSettings.bundleVersion is 1.0
, and PlayerSettings.bundleIdentifier is set to the Bundle ID of your app.
Under Optimization, there are a few settings that you can keep as default so that you know what the important ones do:
When everything is set, click on Build. This will prompt you to save the build at a location on your computer. It doesn't matter where.
When the build is done, navigate to where you saved it. If you are not on a Mac, you need to copy this whole folder onto your Macintosh machine. You can do this with version control, a local network, or you can zip it up and send it to yourself and then download it on your Mac.
In order to open the project in Xcode, open the folder and double-click on the file that ends with Xcodeproj. This will open Xcode and your project.
In the General tab in Xcode, you will see the project general settings. This includes things, such as Bundle Identifier, Version, Deployment Target, and the type of devices the game will run on.
Under the Identity portion of the General settings tab, there is a drop-down menu for Team. Click on it and then select Add an account. This will open the Accounts window. In the bottom-left corner of this window, click on the small + sign and select Add Apple ID…. This will prompt you to log in with your developer credentials. Use these credentials to log in.
After logging in, you can close the Accounts window. Now, from the Team drop-down list, you should be able to change it from None to your team name, which is probably the name and e-mail you used to create your account:
To make sure the certificate went through, visit https://developer.apple.com.
At the bottom of the page, click on iOS Apps.
On the following page, if not logged in to your developer account, log in. After this, in the top-right corner, click on the link called Certificates, Identifiers & Profiles.
Under iOS Apps, click on Certificates.
When the page loads, you should have All selected in the Certificates section. On the right-hand side of your screen, you should see your name, the type of certificate, and the expiry date (1 year after the creation of it):
Through the course of this book, we will use two different types of certificates: iOS Development and iOS Distribution.
iOS Development refers to a certificate you can use during development, and iOS Distribution is the certificate that can be used when you are ready to submit your game for distribution.
The process of setting up iTunes Connect and Developer Account is important because these are the settings we will use in Unity in order to unlock achievements, leaderboards, in-app purchases, and display iAds.
If we didn't go through the process of creating an app in iTunes Connect, it would be impossible to release a game on the App Store, and if we didn't set up the Game Center features, we wouldn't be able to have achievements or leaderboards. The same is true for in-app purchases and iAds.