How to configure Build Scripts in Xcode

This document provides step-by-step instructions on how to configure a build script to run on each build executing a command line tool. SwiftLint is used as an example.

Cihat Gündüz
2 min readFeb 11, 2019

--

Step 1: First, install the tool(s) you want to execute in the build script (e.g. via Homebrew or Mint)

brew install swiftlint

Step 2: In Xcode, select your target to add the build script to

Step3: Navigate to the Build Phases tab

Step 4: Click the + Button and choose New Run Script Phase

Step 5: Rename your new script by double-clicking onto the text Run Script

Step 6: Copy the following script into the text field below Shell: /bin/sh

--

--

Cihat Gündüz

📱Indie iOS Developer, 🎬Content Creator for 👨🏻‍💻Developers. Apps: RemafoX, Twoot it!. More in the works.