Skip to content

Get started

Danil Kovalev edited this page Jul 8, 2019 · 1 revision

For get started, first of all, you have to install Cocoapods 🥥.

Installing cocoapods

  1. Type sudo gem install cocoapods into your terminal.
  2. cd <Path-to-your-project>
  3. pod init
  4. open Podfile -a textedit
  5. Paste pod 'SwiftInjectorable' inside Podfile 📁
  6. Run pod install

Using library

  1. Create new .swift class in your project named RootContainer.swift
  2. import SwiftInjectorable
  3. Inherit this class from DIContainer.swift
  4. Override register() function and register your dependencies
Clone this wiki locally