So I’m using an SDK that returns a view. Right now I have it as a UIViewController and then I'm creating an instance of that in another class that's an RCTViewManager and returning the instance view to bridge it. How would you bridge EventEmitters from the ViewController to React Native with an RCTViewManager in the middle of them? Thanks so much for your time!
This is my RCTViewManager that's exporting my view and functions, I just need Event Emitters now
import Foundation
import UIKit
@objc(MapViewManager)
class MapViewManager : RCTViewManager {
var viewController:SDKViewController? = SDKViewController.init()
@objc(functionOne)
func functionOne(){
DispatchQueue.main.async {
self.viewController?.functionOne()
}
}
@objc(functionTwo)
func functionTwo(){
DispatchQueue.main.async {
self.viewController?.functionTwo()
}
}
override func view() -> UIView! {
return self.SDKViewController?.view
}
}