Using CircleCI 2.0 in iOS apps
We ‘ve been using CircleCI for many of our open source projects. Since the end of last year 2017, version 2.0 began to come out, and we think it’s good time to try it now together with Swift 4.1 and Xcode 9.3
The problem with version 2.0 is it’s so powerful and has lots of cool new features like jobs and workflows, but that requires going to documentation for how to migrate configuration file, especially Search and Replace Deprecated 2.0 Keys
Creating config.yml
The first thing is to create a new config.yml
inside folder .circleci
Copy your existing circle.yml file into a new directory called .circleci at the root of your project repository.
Next is to declare version and jobs
Add version: 2 to the top of the .circleci/config.yml file.
Checking xcodebuild
For simple cases, we just use xcodebuild
to build and test the project, so it's good to try it locally to avoid lots of trial commits to trigger CircleCI. You can take a look at this PR hyperoslo/Cheers#20
Before our configuration file for version 1.0 looks like this
- set -o pipefail && xcodebuild -project Cheers.xcodeproj -scheme "Cheers-iOS" -sdk iphonesimulator -destination…