How to Test Unity Games on an iOS Device Without a Developer Account

Test your mobile games on iOS without spending 99$

Sergio Ortiz
Better Programming

--

Photo by Onur Binay on Unsplash.

If you are starting to develop mobile games on Unity, one of the first questions that might actually pop into your mind is how to play your game on your iOS device. Most of the literature that you will find on the web (including the Unity documentation) will ask you to have a 99$/year Apple Developer account, and generate certificates for building your games into your device.

Fortunately, there is a way to test your games without actually having a developer account, all you need is an Apple ID. Of course, you will need a Developer account later for publishing your games in the App Store, but we need to develop the game ;-).

Without further ado, let’s test our Unity games on iOS!

Prerequisites

I assume you have basic knowledge of Unity and Xcode. For this tutorial I had the following :

  • macOS Monterey
  • Unity LTS 2020.3
  • Xcode 13
  • An iOS device with iOS 15

You should also have a game that you want to export. If you don’t have one, you can download one from here (Disclaimer: this game was created following the instructions of this official Unity tutorial and is not ready for mobile playing, but it’s enough for this tutorial).

Install the iOS builder module

First things first, we need to be able to build our Unity games to iOS. Open Unity Hub and select Installs. Select your LTS version, click on the gear icon on the right of the version name, and select Add Modules.

On the Add modules window, under Platforms, activate iOS Build Support and select Install.

The module will begin installing, this can take up to a few minutes depending on your computer. After the installation is complete, restart Unity (no need to restart the Hub).

Build your game for iOS

Open Unity, go to File > Build Settings, and select Switch Platform on the bottom of the window.

Unity will start making the switch, once it is finished, the Unity icon will appear next to the iOS icon and the Build option will be activated.

Select Build, you will be prompted for a place where to save the files. Attention: select an empty folder or create a new one for the export, all the contents of this folder will be overwritten.

Make the necessary adjustments on Xcode

Once Unity finishes building, go to the previously selected or created folder, find the .xcodeproj file, and double click to open it. It might take a couple of minutes for Xcode to open and index the files.

Magic! Your game is on Xcode. We are not done yet though.

We are almost there! We still need to modify the signing of the app on Xcode so we can play the game on our device.

Select the project name, in my case it’s Unity-iPhone, go to “Signing & Capabilities”. Select “Automatically manage signing”. Once you select this option the Team menu will be made available. Select the Team associated with your Apple ID account.

Connect your iOS device and test your game

It’s time to play! Connect your iOS device to your MacBook.

On the top of your Xcode window, you will see the name of your app and the target device, it will first show “Any iOS Device (arm64)” as device name.

Click on that device name and select your iOS Device.

Press Command + R to build and run your game! You are all set!

I hope this was helpful. This is of course the easiest part, you will still need to make sure your game actually works on iOS, but at least now you know how to test your game on an actual device.

--

--

Sergio has lived in three continents and is currently based in Switzerland. He codes mobile games and apps as side-hustle.