How do I call this Swift extension convenience constructor from Kotlin?
public extension UIView {
convenience init(svgData: Data, parser: SVGParser? = nil, completion: ((SVGLayer) -> ())? = nil) {
...
According to the Interop documentation, i was expecting that this should work:
create(svgData = data, parser = null, completion = null)
However, it doesn't compile (Unresolved reference: create) and it it seems like this approach would pollute the global namespace quite a bit. On the other hand, I can't really see a "canonical" mapping to some companinon object...
p.s. I have read that static extension functions are possible via the companion object in Kotlin, but UIView.Companion.create(...) doesn't seem to work either.
p.p.s.: As somebody had pointed out that the Kotlin mapping is based on ObjC (now deleted): perhaps this is relevant: Is it possible to call Swift convenience initializer in Objective-C (didn't help me to figure out the mapping though)