How to upload your game from Unity to Xcode

This is article is about uploading your completed game from Unity platform to Xcode.

UNITY – Platform setups

Assuming you were building for Android devices in Unity, which means your Unity settings are set to Android. This means you need to switch platforms.

In order to do this, you need to go “File” -> “Building Settings”. Once, a new panel opens up, you are presented with several options of platforms, e.g. IOS, Android, WebGL. (the platforms which you see depends on the options you have chosen when installing Unity in your computer).

Select the “IOS” option and press “Switch platform”. Once you have done this, Unity will take a few seconds to copy some files.

Once this step is completed, you will want to go “Edit” -> “Project Settings”. In this window panel, you will need to check that you have completed these various items:

  • Company name <-name of company / business / your name
  • Product name <- this is the name of your game
  • Version <- this is the name of version of your game

Then scroll down to IOS tab (ensure that the IOS tab is selected and not other tabs for other platforms).

Scroll down to “Other Settings” and change the “Bundle identifier” to the one which you want to use in XCode.

You will also need to change your “Version” and “Build”. (“Version” is the version of your game and “Build” is the number you use to identify each time you release the game to the Google or Apple store. So, you can have version 1 of your game but build 3 because this is the first version of your game and the 3 time to you released it to the Stores)

Note: I am assuming that when you start building the game in Unity, the platform you start off with is “Android”. So, you would have completed, all the other basic setups like your App icon, game orientation and the splash screen.

UNITY – Google ads

This section is only relevant if you are using Google ads as part of your monetization strategy in your game.

Obtain your app id and ad id from Google and copy them into your text editor. You will need to copy these ids into Unity.

For your IOS App id, go to “Assets” -> “Google Mobile Ads” -> “Settings”.

At the top right hand corner of your Unity console, you should see 2 text boxes; one is for Android (which you have completed) and IOS. Copy and paste the IOS app id from Google into the IOS text box.

Note: there is an issue where the App ids are not saved and this is a known Unity issue. If this is the case, I find it helpful that you click the “Delay app measurement” checkbox, in order to get around this issue.

For your IOS ad ids, you will need to add these in your C# script as you would when you were developing the game for Android.

UNITY – make the build

Before making the actual build itself, I find it useful to organize the various builds. If you release several builds to the store, organizing the builds into separate folders comes in handy.

So, create a new folder in your computer file system. Name your folder with the relevant name. Go to “File” -> “Building Settings”. Click the “Build” button and select the folder which you have created recently. The build process can take a few seconds to a few minutes.

Side note: when doing this I encountered an error with the Cocoapods version and Unity version. I had to downgrade my Cocoapods to a lower version before the IOS build was successful.

Once you have completed the build successfully, you will notice files created in the folder which you selected earlier.

XCODE

In order to launch Xcode, you will need to click the “xcworkspace” file which was created by Unity in the previous steps. (XCWorkspace was created because the Unity build needed Cocoapods in its implementation).

On left panel, near the top, you will see the default name given by Unity and it is always defaulted to “Unity-Iphone” as the project name.

I find it useful to rename this defaulted name to the name of your game.

In order to do this, you go to name “Unity-iPhone” in top left corner of Xcode and rename it like you would for any file in your file system. You will receive a confirmation on whether you want to proceed with the renaming (there a number of dependancies affected by the renaming).

With the new project name highlighted, in the middle of Xcode, in the “General” tab, do ensure that your “Bundle identifier”, “Version” and “Build” number are correct.

Next, click on the “Signing & Capabilities” tab, and check that you have digitally signed the application. Do check that the “Bundle identifier” is correct.

Then proceed to “Product”->”Scheme”->”Edit scheme”. Once your panel opens up, click “Archive” (located in the left side panel. Then type in the name of your game in the text box “Archive name”. This will name your archive package appropriately, instead of some default name provided by Unity.

Once you have done these changes, you can “Product”->”Archive” the game like you would normally do with IOS build.

error: Content is protected !!