You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran into a bug where when trying to inject with a Swift string instead of a NSString it results in a function call (Foundation._convertNSStringToString) to convert between types which results in the forwardingTargetForSelector: function of TyphoonInjectionByRuntimeArgument being called and crashing program.
Workaround is to instead declare the type as NSString:
I'm afraid this is a known limitation and I don't think there's anything we can do about it at this stage.
Swift doesn't have its own native reflection and by default it uses the less dynamic vtable style dispatch, in contrast to Objective-C's very flexible messaging. Therefore for DI with Typhoon we go via the Objective-C runtime, which can only deal with types that are interoperable between both layers.
Thanks @dereekb, we appreciate that. We put the information in the Swift Quick Start, but if you can remember the place where you expected to find this information (header doc, another wiki, etc) we can also add it there. . We'd much prefer folks to know about this up-front than to encounter the issue and then go searching for answers.
Ran into a bug where when trying to inject with a Swift string instead of a NSString it results in a function call (Foundation._convertNSStringToString) to convert between types which results in the forwardingTargetForSelector: function of TyphoonInjectionByRuntimeArgument being called and crashing program.
Workaround is to instead declare the type as NSString:
If boo is declared as an NSString before injection, the conversion won't occur.
The text was updated successfully, but these errors were encountered: