-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assembly property isn't filled with correct object in storyboard switch #337
Comments
I haven't read whole code, but I noticed that code: [[TyphoonAssemblyActivator withAssemblies:@[self]] activate]; In that case your If you use If you using plist integration, then you have to add your @property (nonatomic, strong) InjectedClass(QuickSearchStoryboardViewFactoryAssembly) quickSearchStoryboardViewFactory; or inject that manually with @property (nonatomic, strong) id<DetailsStoryboardViewFactoryProtocol> quickSearchStoryboardViewFactory; And put inside return [TyphoonDefinition withClass:[MapWireframe class] configuration:^(TyphoonDefinition* definition) {
[definition injectProperty:@selector(quickSearchStoryboardViewFactory) with:self];
}];
} |
Thanks for the answer! |
Check that ServiceAssembly has |
The plist now has the following classes to be loaded under
|
Did you remove this? - (id) init{
self = [super init];
if (self) {
//This call is extremely important without it the subclass methods would return TyphoonDefinition objects and not the proper object
[[TyphoonAssemblyActivator withAssemblies:@[self]] activate];
}
return self;
}
|
yes, it's no longer part of the class |
Ah.. You also have to remove this: //We get the QuickSearchStoryboardViewFactory from here
- (id<QuickSearchStoryboardViewFactoryProtocol>) quickSearchStoryboardViewFactory
{
return [TyphoonDefinition withClass:[QuickSearchStoryboardViewFactoryAssembly class] configuration:^(TyphoonDefinition *definition) {
[definition setScope:TyphoonScopeLazySingleton];
}];
} From your |
That's it, it's working now! Many thanks! :) |
Hello!
I'm currently writing an app and until now we haven't had any trouble using Typhoon, but the application was becoming too big for us to use a single storyboard and we tried to divide it into several. We usually don't have any problems switching from storyboard to storyboard except when we try to get object in an assembly that is referring another.
I've pasted the whole classes but made some comments the parts of the code that are involved in the execution trace.
The actual error is: "No component matching id 'appleContactsService'.
The TyphoonInitialAssemblies in the plist goes like this:
StoryboardViewFactoryAssembly
MainStoryboardViewFactoryAssembly
ModelCoreAssembly
ServiceAssembly
we also tried to put QuickSearchStoryboardViewFactoryAssembly in the initial plist thinking that maybe like that the ServiceAssembly reference could be resolved but that also didn't work.
-------------------------------------------------- MAPWIREFRAME--------------------------------------------------
-----------------------------------------StoryboardViewFactoryAssembly--------------------------------------------
------------------------------------QuickSearchStoryboardViewFactoryAssembly-------------------------------
This class inherits from FactoryAssembly whose only method is
interface
implementation
thanks in advance!
The text was updated successfully, but these errors were encountered: