I am having trouble implementing defaultAssembly () for my quick application. I need to access one of the dependencies directly from legacy code.
The application is fully integrated into the typhoon - with the initialization of Plist and storyboard.
The first problem was to set the assembly by default, because it is automatically created from plist. In the end, I just made it default after activation. I do not know if it works correctly, but it works.
public override func activate() -> AppAssembly! {
var instance = super.activate() as! AppAssembly
instance.makeDefault()
return instance
}
The real problem is when I get it like this:
var assembly = TyphoonAssembly.defaultAssembly() as! AppAssembly
I get an error message:
Could not cast value of type 'TyphoonBlockComponentFactory' (0x10f78bc40) to 'AppAssembly'
How do I get it? Or did I set the default assembly incorrectly?
Thank you Thomas