Skip to content

Manually created assembly looses it's factory reference #551

@AlexeyPoldeo

Description

@AlexeyPoldeo

Hello!

I'm newbie to Typhoon and hitting a lot of stupid problems on ObjC...

I prefer to create assemblies manually because using layered architecture and need to create new assembly for each user layer. It's not possible to use automatic assemblies generation because I have to inject some user specific information into the assembly.

Everything works fine until the end of the method.
After that any attempt to instantiate new object causes "method not found" crash.

I did some research and found that manually activated assemblies become instances of TyphoonAssemblyAccessor and later loosing reference to fabric property. This property resets to nil because declared as weak. It makes the assembly unusable anywhere outside the method scope where is was created because it immediately looses it's fabric.

I've figured out that the only way to keep this reference alive is to patch the sources (make it strong) or to make the assembly default.

This definitely is something that I do not want to do.

Please help.

PS: Please do not suggest to switch to Swift or use plist assemblies creation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions