I wrapped the delegate inside a factory class in swift exposed by @objc and used that instead,
v
Vlad
10/03/2023, 10:10 AM
So you basically with such swift wrappers can create "kotlin-friendly" APIs and obviously have access to any apple APIs?
p
Pete Hellyer
10/03/2023, 10:12 AM
yes - especially so for 3rd party APIs in pure swift.
Pete Hellyer
10/03/2023, 10:16 AM
that advice notwithstanding @brabo-hi, I’m pretty sure you can build a class that inherits WKNavigationDelegateProtocol and set the delegate to an instance of that.
Copy code
class NavigationHander (private val callBack: (String) -> Unit): WKNavigationDelegateProtocol, NSObject()
b
brabo-hi
10/03/2023, 3:23 PM
I think creating a wrapper class is a good way to go. Thanks for your support