I'm building a bridge library for react-native that is a wrapper around my SDK.
In Android, I can pull out a view by passing nativeId
from react-native side, using:
@ReactMethod
fun initialiseValidation(uniqueId: String) {
val rootView = reactContext.currentActivity?.window?.decorView?.rootView
val myView = ReactFindViewUtil.findView(rootView, uniqueId) as EditText
Now I am trying to replicate the same in iOS - writing it in Swift.
@objc(initialiseValidation:withUniqueId:)
func initialiseValidation(uniqueId: String) -> Void {
let rootViewController = UIApplication.shared.delegate?.window??.rootViewController
# ReactFindViewUtil cannot be found anywhere
I cannot seem to be able to use ReactFindViewUtil
-- how can I get my hands on the TextView in Swift using the nativeId
?