<commit_before>This guide will help you set up Continuous Delivery for your iOS project.

It will help you set up all needed build tools. I tested everything with a fresh Yosemite installation.

-------
<p align="center">
    <a href="#installation">Installation</a> &bull;
    <a href="#setting-up-fastlane">Setting up</a> &bull;
    <a href="#example-projects">Example Project</a> &bull;
    <a href="#help">Help</a>
</p>
-------

## Notes about this guide
If you don't want to use `sudo`, you can follow the [CocoaPods Guide](http://guides.cocoapods.org/using/getting-started.html#sudo-less-installation) of a *sudo-less installation*.

See how [Wikipedia](https://github.com/fastlane/examples#wikipedia-by-wikimedia-foundation), [Product Hunt](https://github.com/fastlane/examples#product-hunt) and [MindNode](https://github.com/fastlane/examples#mindnode) use `fastlane` to automate their iOS submission process.

## Installation

Requirements:

- Mac OS 10.9 or newer
- Ruby 2.0 or newer (`ruby -v`)
- Xcode

Additionally, to an Xcode installation, you also need the Xcode command line tools set up

    xcode-select --install

If you have not used the command line tools before (which is likely if you just installed it), you'll need to accept the terms of service.

    sudo xcodebuild -license accept

### [fastlane](https://github.com/fastlane/fastlane)

Install the gem and all its dependencies (this might take a few minutes).

    sudo gem install fastlane --verbose

## Setting up `fastlane`

Before changing anything, I recommend committing everything in `git` (in case something goes wrong).

When running the setup commands, please read the instructions shown in the terminal. There is usually a reason they are there.

`fastlane` will create all necessary files and folders for you with the following command. It will use values detected from the project in the working directory.

    fastlane init

This will prompt you for your _Apple ID_ in order run [`produce`](https://github.com/fastlane/produce) which will create your app on iTunesConnect and the Apple Developer Center, and enable [`sigh`](https://github.com/KrauseFx/sigh) and [`deliver`](https://github.com/KrauseFx/deliver).

That's it, you should have received a success message.

What did this setup do?

- Created a `fastlane` folder
- Moved existing [`deliver`](https://github.com/fastlane/deliver) and [`snapshot`](https://github.com/fastlane/snapshot) configuration into the `fastlane` folder (if they existed).
- Created `fastlane/Appfile`, which stores your *Apple ID* and *Bundle Identifier*.
- Created `fastlane/Fastfile`, which stores your deployment pipelines.

The setup automatically detects, which tools you're using (e.g. [`deliver`](https://github.com/fastlane/deliver), [CocoaPods](http://cocoapods.org/)).

### Individual Tools

Before running `fastlane`, make sure, all tools are correctly set up.

For example, try running the following (depending on what you plan on using):
<commit_msg>iTunes Connect is two words<commit_after>This guide will help you set up Continuous Delivery for your iOS project.

It will help you set up all needed build tools. I tested everything with a fresh Yosemite installation.

-------
<p align="center">
    <a href="#installation">Installation</a> &bull;
    <a href="#setting-up-fastlane">Setting up</a> &bull;
    <a href="#example-projects">Example Project</a> &bull;
    <a href="#help">Help</a>
</p>
-------

## Notes about this guide
If you don't want to use `sudo`, you can follow the [CocoaPods Guide](http://guides.cocoapods.org/using/getting-started.html#sudo-less-installation) of a *sudo-less installation*.

See how [Wikipedia](https://github.com/fastlane/examples#wikipedia-by-wikimedia-foundation), [Product Hunt](https://github.com/fastlane/examples#product-hunt) and [MindNode](https://github.com/fastlane/examples#mindnode) use `fastlane` to automate their iOS submission process.

## Installation

Requirements:

- Mac OS 10.9 or newer
- Ruby 2.0 or newer (`ruby -v`)
- Xcode

Additionally, to an Xcode installation, you also need the Xcode command line tools set up

    xcode-select --install

If you have not used the command line tools before (which is likely if you just installed it), you'll need to accept the terms of service.

    sudo xcodebuild -license accept

### [fastlane](https://github.com/fastlane/fastlane)

Install the gem and all its dependencies (this might take a few minutes).

    sudo gem install fastlane --verbose

## Setting up `fastlane`

Before changing anything, I recommend committing everything in `git` (in case something goes wrong).

When running the setup commands, please read the instructions shown in the terminal. There is usually a reason they are there.

`fastlane` will create all necessary files and folders for you with the following command. It will use values detected from the project in the working directory.

    fastlane init

This will prompt you for your _Apple ID_ in order run [`produce`](https://github.com/fastlane/produce) which will create your app on iTunes Connect and the Apple Developer Center, and enable [`sigh`](https://github.com/KrauseFx/sigh) and [`deliver`](https://github.com/KrauseFx/deliver).

That's it, you should have received a success message.

What did this setup do?

- Created a `fastlane` folder
- Moved existing [`deliver`](https://github.com/fastlane/deliver) and [`snapshot`](https://github.com/fastlane/snapshot) configuration into the `fastlane` folder (if they existed).
- Created `fastlane/Appfile`, which stores your *Apple ID* and *Bundle Identifier*.
- Created `fastlane/Fastfile`, which stores your deployment pipelines.

The setup automatically detects, which tools you're using (e.g. [`deliver`](https://github.com/fastlane/deliver), [CocoaPods](http://cocoapods.org/)).

### Individual Tools

Before running `fastlane`, make sure, all tools are correctly set up.

For example, try running the following (depending on what you plan on using):

{'fraction_non_alphanumeric': 0.1104253544620517, 'fraction_numerical': 0.0016680567139282735, 'mean_word_length': 4.460837887067395, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4350105', 'n_tokens_mistral': 1747, 'n_tokens_neox': 1666, 'n_words': 691}