Install Homebrew
Homebrew is a package manager for macOS and used for managing installation of the various tools needed for iOS and macOS CI efforts. This step takes about 15 minutes, and requires the password at least once.Install Ruby
Lots of tooling requires a modern Ruby installed (fastlane for instance), so we also update our system Ruby:Install fastlane
fastlane provides an easy way to automate beta deployments and releases for iOS and Android apps. To install it, run:Install CocoaPods
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. It is installed via ruby gem:Install Node.js
To install the latest version of Node.js run:/usr/local/bin so it is available in PATH.
NOTE : Consider using nvm to manage different Node.js versions. To install nvm run:
Install Java 8
To setup a Jenkins agent, Java 8 must be installed on the machine. To do that, run:Install Xcode
Do this is via a VNC/screen-sharing session. If working from a Mac, open the Finder and press “cntrl k”. This opens the machine’s built-in VNC GUI. Collect your public IP and screen-sharing port, and pass them in the GUI.- Enter the user credentials.
- Open a web browser via the screen-sharing connection.
- Navigate to <https://developer.apple.com>
- Log in
- Navigate to <https://developer.apple.com/downloads/more>
- Download and install the preferred version of Xcode by clicking the download link and double-clicking on the resulting download.
Creating Dedicated Build User
MacStadium recommends having a dedicated user that is responsible for building OSX/iOS applications. First, create a group for this user. The group needs to have an unique ID. List the current group IDs in а numerical oder by running:Creating Default Keychain for the Build User
Since the build user will not log into the OSX machine, a default keychain will never be created.This could cause build and/or code sign issues (especially when using fastlane). To create a default keychain for the build user, switch to the build user in the terminal:
login.keychainand makes it default for the build user.The security command line tool has a bug and does not add the new keychain to the list of available keychains. To fix this, call:
Logging Remotely with the Build User
Remote logging is required. To log remotely with the newly created build user and ensure the user can log remotely:- buildMachine_rsa - This is the private key. Keep it safe and do not share it with anyone.
- buildMachine_rsa.pub - This is the public key.
scp. This command executed copy over SSH; run:
authorized_keys file. It lists all keys that can be used to log remotely with a given user: