1
自動注入マクロを使用してアセンブリを正しく取得することに問題があります。たとえば:台風のプロトコルによる自動注入アセンブリ
@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
はその後、ビジネスロジックファイルでそれを使用しようとしている:
@interface MyStuff()
@property (nonatomic, strong) InjectedProtocol(IFormatterProvider)formatterProvider;
@end
しかし、アセンブリが得たので、「タイプをsatisifyないコンポーネント定義されたが、」エラーが(ところで、タイプミスがある)きTyphoonInjectionDefinition
として登録済みNSObject
私は何をしているのですか?
明示的な注射を避けることはできません。 [issue](https://github.com/appsquickly/Typhoon/issues/529)を追加しました – Emil