No description, website, or topics provided.
Objective-C Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CRDI Tests
CRDI.xcodeproj
CRDI.xcworkspace
CRDI
.gitignore
.travis.yml
CriolloKitDI.podspec
LICENSE
Podfile
Podfile.lock
README.md

README.md

DI Build Status

Inspired by

  • AppleGuice
  • Objection

Features

Road Map

  • Injection Configuration Modules
  • Bind class to protocol

[module bindClass:[UserClass class] toProtocol:@protocol(UserService)];

  • Bind class to class

[module bindClass:[MyNSString class] toClass:[NSString class]];

  • Bind factory block to protocol

[module bindBlock:^{ return [[UserClass alloc] initWithParam:@1]; } toProtocol:@protocol(UserService)];

  • Property Injection

@property (nonatomic, strong) id<UserService> ioc_userService;

  • Factory methods

Service *s = [module instanceForProtocol:@protocol(Service)];

  • Different instantiation modes (Normal/Singltone)

[module bindClass:[UserClass class] toProtocol:@protocol(UserService) mode:DIInstantiationModeSingltone];