I have a basic TVML application set up. Currently simple events (such as a button press) are handled via JavaScript (TVJS).
When the user presses a button (provided via TVML template) I'd like some code to run in Swift instead, that manipulates UI elements.
What's the best way to do this?
You can use evaluateAppJavaScriptIn method in TVApplicationControllerDelegate as below and write corresponding swift method in it; (swift side)
After that you can call this method from TVJS like this; (js side)