macOS and iOS builds

Using Codefresh for Mac/iPhone applications

Codefresh offers alpha support for macOS and/or iOS as a CI/CD environment. Access to the build environment is possible by invitation only. To run macOS/iOS pipelines in Codefresh, open a free account and then contact sales in order to enable this build environment type.

macOS/iOS builds are only available for the SaaS platform. They are not available for the Hybrid platform at this time.

Enabling macOS/iOS support

Once approved, you will get access to a special runtime environment that will run your macOS/iOS builds. To use this environment create a new pipeline and select it in the pipeline settings screen.

Running a pipeline on the macOS environment

Running a pipeline on the macOS environment

The macOS runtime environment has Xcode already installed for your iOS and/or macOS builds.

Building macOS/iOS applications with Codefresh

Once you assign the special macOS runtime to your pipeline, you can write your Codefresh YAML as usual, keeping in mind the following points

  • The git-clone step is available
  • Freestyle steps must use the freestyle-ssh type
  • The manual approval step is available
  • All Docker-related pipeline steps such build, push, deploy, composition are NOT available.
  • Parallel steps are supported
  • Only one active build is supported at any given time.

As part of the alpha version the nodes that run your macOS builds are actual nodes (i.e. not containers), so all changes you make there are permanent. This is a temporary limitation of the current Alpha release and will not be present in the General Availability version of the build service.

macOS build pipeline example

You can find a full Codefresh example at

Create a pipeline for it with the following YAML content:


version: '1.0'
  - 'Clone Repo'
  - 'Test & Build'
  - 'Approve'
  - 'Run the App'
    type: git-clone
    repo: alex-codefresh/osx-demo-webserver
    git: github
    revision: master
    stage: 'Clone Repo'
    type: parallel
    stage: 'Test & Build'
        type: 'freestyle-ssh'
        description: 'Run dummy unit tests..'
        working_directory: '${{CloneRepo}}/GCDWebServer'
          - ./
        fail_fast: false   # ignore if the tests fail, just for the demo purposes
        type: 'freestyle-ssh'
        description: 'Build the application...'
        working_directory: '${{CloneRepo}}'
          - xcodebuild -workspace DemoWebServer.xcworkspace -scheme DemoWebServer archive -archivePath ../build/DemoWebServer.xcarchive | xcpretty

    type: pending-approval
    description: 'Stop pipeline until approval. Just as an example'
    stage: 'Approve'
    fail_fast: true

    type: 'freestyle-ssh'
    description: 'Run the built sample web-server binary on the same node'
    working_directory: '${{CloneRepo}}'
    stage: 'Run the App'
      - killall DemoWebServer 2>/dev/null || echo "No instances currently running, continuing" #just in case there is instance already running
      - bash -c "../build/DemoWebServer.xcarchive/Products/Applications/ &"
      - sleep 60
      - kill $(jobs -p) 2>/dev/null || exit 0

This pipeline clones the sample application, builds it with Xcode and then runs it. Notice that the run step cleans up on its own (because macOS builds are not docker based so nothing is cleaned up automatically when the pipeline has finished).

Notice also that freestyle-ssh steps do not define a docker image (unlike normal freestyle steps).

The logs will show all build information:

macOS build log

macOS build log

Currently, we are working on offering configurable versions of Xcode, Swift, and macOS so that pipelines can define exactly what development environment they need. We also plan fastlane integration.