CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

EEEInjector 1.0.4

EEEInjector 1.0.4

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Eric-Paul Lecluse.



  • By
  • Eric-Paul Lecluse

f.k.a. TwelveTwentyToolkit/TTTInjector

Dependency Injection

If you've never heard of it, it can be a bit hard to immediately grasp the concept and the power of Dependency Injection(DI), but once you've worked with it, you will not want to go without again. DI is about much more than reducing the reliance on singletons, see the benefits section on Wikipedia.

There are other existing frameworks that allow for dependency injection in Objective-C, with the objection framework being the most prominent. Unfortunately, the syntactical sugar that objection adds to your code is somewhat 'weird', and because it's not instantly obvious what the meta-code does, it will confuse your colleagues and/or clients, and hardly get anyone excited about it.

Several features:

  • Runtime substitution of class instances by instances of a subclasses
  • Class or protocol based injection mapping
  • Automatic lazy injection of @dynamic properties
  • Comparmentalized singletons (per injector instance, great for TDD purposes)
  • Preset object injections, including named objects
  • Block based injections that run the moment you access them
  • Single-serving injections (unmap after use)

Installation

Usage

Have a look at the Kiwi test specs in the Xcode Injector.xcworkspace to see the features that the Injector currently supports.

Author

Eric-Paul Lecluse, [email protected]

License

This is free and unencumbered software released into the public domain. See the LICENSE file for more info.