iOS Building and TestFlight - UO-DFM/SimCityOttawa-Documentation GitHub Wiki

Overview

Currently, the game is only being distributed to players via Apple's TestFlight application. Every 90 days, a new build must be uploaded to TestFlight to keep the game available to players at all times. Since new builds must go through a review process once uploaded to TestFlight, the process outlined in this document should be performed a few days in advance. If there are no changes to the codebase, you should be able to reuse an existing iOS build and upload that to TestFlight. If there are changes to the game, you will have to create a new iOS build from the Unity Editor using a new version number and then upload that to TestFlight.

An Apple MacBook device will be needed for this process.

iOS Build Instructions

Based on instructions found at https://youtu.be/80-nE7ichvk.

Important: To successfully build the game, you will require admin/owner role to the project for your unity account.

Required Installations

  • Unity Editor (2019 or later)
  • Xcode
  • Cocoapods

To install cocoapods type the following command into your Terminal window:

sudo gem install cocoapods

Build Application

In Unity Editor:

  1. Change Build Platform

File -> Build Settings... -> Platform -> iOS -> Switch Platform

  1. Change Version Number

File -> Build Settings... -> Player Settings...

  • Enter desired version number in "Version" field
  • Close the window
  1. Build Application

File -> Build Settings... -> Platform -> iOS -> Build

  • Enter build name in "Save As:" field
  • Select folder to save build to in "Where:" field
  • Save

Xcode and TestFlight Uploading

Open and Run in Xcode

  1. Open Xcode
  • Navigate to build folder saved in previous step
  • Open Unity-iPhone.xcodeproj
  1. Configure Xcode

Xcode -> Setting... -> Accounts

  • Add AppleID account Unity-iPhone -> Signing & Capabilites -> Select "Automatically manage signing" -> Select development team
  1. Load Application (This step is for local testing, skip if uploading to TestFlight)
  • Plug iPhone into computer
  • Trust Computer if prompted
  • Enable Developer Mode

Settings -> Privacy & Security -> Security -> Developer Mode -> Enable -> Restart

  • Select phone as target device
  • Select "Play Button"
  • Trust developer

Settings -> General -> VPN & Device Management -> Developer App -> Trust

Upload Build to TestFight

Based on instructions found at https://youtu.be/6VuLukGpNv8?si=wQIPydrrApp3GSie.

  1. Open Xcode

Open Existing Project...

  • Navigate to desired build folder
  • Open Unity-iPhone.xcodeproj
  1. Sign in to DFM's Apple account

Xcode -> Setting... -> Accounts

  • Sign in
  1. Configure Xcode

Unity-iPhone -> Signing & Capabilities -> Select "Automatically manage signing" -> Select development team

  1. Create and Distribute Archive

Product -> Archive

  • Wait for build to finish and Archives tab should pop up

Distribute App -> TestFlight & App Store -> Distribute

  • Wait for upload to be complete

Manage Build in TestFight

  1. Login to App Store Connect (https://appstoreconnect.apple.com/)

My Apps -> SimCityOttawa -> TestFlight

  1. Configure Build

Under Version X.X.X -> Status -> Click 'Manage' -> Select 'None of the algorithms mentioned above' -> Save

Click on the build

  • Add a description for "Test Details"
  1. Add tester groups to the build

Under Version X.X.X -> Groups -> Click plus button

  • Add external tester group
  • Wait for build to be approved for external testing

Open Existing Archive Builds

  1. Open Xcode
  2. Load build
  3. Open Archives

Window -> Organizer