I am currently working on adding tvOS support to an Objective-C library. I want to enable developers to be able to use the full power of TVML, so I need to find a way to expose the existing ObjC objects into the Javascript Context.
I have seen many examples of how to extract the properties and methods you want to expose into a protocol that inherits from the JSExport protocol, but this seems like an awkward solution. I would prefer not to have all of my public classes defined in protocols.
Is it possible to dynamically export all properties and methods on all public classes somehow? Perhaps by specifying something in the modulemap file? A colleague suggested that he thought something like this was possible.
Thanks!
Andrew