Get started - Hadevs/SwiftInjector GitHub Wiki
For get started, first of all, you have to install Cocoapods 🥥.
Installing cocoapods
- Type
sudo gem install cocoapodsinto your terminal. cd <Path-to-your-project>pod initopen Podfile -a textedit- Paste
pod 'SwiftInjectorable'inside Podfile 📁 - Run
pod install
Using library
- Create new .swift class in your project named
RootContainer.swift import SwiftInjectorable- Inherit this class from
DIContainer.swift - Override
register()function and register your dependencies