SwiftyMocky CLI

CLI will help you with project setup and mocks generation. Also, it supports new Mockfile format.

To install it:

Mint 🌱:

> brew install mint
> mint install MakeAWishFoundation/SwiftyMocky

Marathon 🏃:

> marathon install MakeAWishFoundation/SwiftyMocky


Clone from https://github.com/MakeAWishFoundation/SwiftyMockyCLI and run make in the root directory.

More information about CLI you will fund in Command Line Interface section.

SwiftyMocky Runtime installation

SwiftyMocky Runtime is available through:

1. CocoaPods.

To install it, simply add the following line to your Podfile:

pod "SwiftyMocky"

Then execute pod install

The integration part is described in setup page.

2. Carthage.

To install, add following to you Cartfile:

github "MakeAWishFoundation/SwiftyMocky"

Then execute carthage update

For Carthage, few additional steps are required:

  1. In your test target, add SwiftyMocky to linked libraries:

    Link binary

  2. In your test target, add new copy files phase:

    Link binary

  3. Select destination to frameworks, and add SwiftyMocky:

    Link binary

The integration part is described in setup page.

3. Ice Package Manager ❄️:

> ice add MakeAWishFoundation/SwiftyMocky

It will be supported when Ice reviews PR, fallback to SwiftPM if any issues.

4. Swift Package Manager:

Add SwiftyMocky to you Package.swift dependencies:

dependencies: [
    .package(url: "https://github.com/MakeAWishFoundation/SwiftyMocky", from: "4.1.0"),

And add SwiftyMocky to your test target dependencies.

Support for other swift versions

Download/build Sourcery binary manually, or use prebuilt sourcery versions from: https://github.com/MakeAWishFoundation/SwiftyMocky.wiki.git

Currentyly we support:

  • 5.0
  • 4.2
  • 4.1