Workstation setup - bonkey/zalando-commerce-ios GitHub Wiki

Start coding

To start coding and compiling run:

brew install swiftlint
git clone [email protected]:bonkey/zalando-commerce-ios.git zalando-commerce-ios && cd $_
bundle install
open Sources/ZalandoCommerceSDK.xcworkspace

If you face problems with commands above, please read further.

Requirements

SwiftLint

It's used during build phases of all 4 projects. It expects correct Ruby setup, so rbenv init - is fired before the call, and then swiftlint is fired from calypso.rb:

  ${PROJECT_DIR}/../calypso.rb lint check ${PROJECT_DIR}/${TARGET_NAME}

Ruby and Calypso

Calypso – a script for common maintenance tasks in the project is build on Ruby.

Ruby

Minimal requirement is Ruby 2.2+ with configured gem bundler

You have system Ruby, but rbenv gives more flexibility:

brew install rbenv rbenv-bundle-exec rbenv-bundler rbenv-bundler-ruby-version rbenv-readline
rbenv install $(cat .ruby-version) # in repository root folder
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile`
  # or ~/.zshrc for zsh
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile`
  # or ~/.zshrc for zsh
gem install bundler