ios - Typhoon auto-inject assembly by protocol -


i'm having problem correctly acquiring assembly auto-injection macros. example:

@protocol iformatterprovider <nsobject>  - (id)statustextformatter;  @end  @interface myassembly : typhoonassembly <iformatterprovider> @end  @implementation myassembly  - (id <iformatterprovider>)formatterprovider {     return [typhoondefinition with:self]; // first guess }  - (id)statustextformatter {     // impl }  @end 

then trying use in business logic file:

@interface mystuff ()  @property (nonatomic, strong) injectedprotocol(iformatterprovider)formatterprovider;  @end 

but getting "no components defined satisify type" error (btw there typo), because assembly got registered typhooninjectiondefinition class nsobject

is possible i'm doing?

you can inject assembly itself, act factory or provider, using this approach. explicit wiring.

i don't believe auto-wiring works assembly protocols, may raise feature request if of interest.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -