Xcode Pre-Build Script

The following steps describe how to configure a pre-build script in a Scheme, in Xcode. The steps below use a project named, “Example”.

1. Click on Example


2. Click “Manage Schemes”

Manage Scheme

3. Select “Example” and click Edit.

Example Scheme

4. Under “Build”, select “Pre-actions”. Then click + to add a “New Run Script Action”.


5. Define your script. The script below copies an external Secrets.swift file into the project.