However my KNM cinterop generates separate getters and setts for instance:
Copy code
@kotlin.commonizer.ObjCCallable
public open expect fun isSmartEqualizerEnabled(): kotlin.Boolean { /* compiled code */ }
@kotlin.commonizer.ObjCCallable
public open expect fun setIsSmartEqualizerEnabled(isSmartEqualizerEnabled: kotlin.Boolean): kotlin.Unit { /* compiled code */ }
markturnip
07/08/2024, 12:36 AM
Is it possible to configure knp to generate direct property access?
In Obj-C, there is no such thing as property on binary level. 2 methods used instead.
KMM generates header that contains 3 items: getter, setter and property itself (that wraps getter and setter methods), so such expression should be available:
Copy code
yourObject.isSmartEqualizerEnabled = true
m
markturnip
07/08/2024, 10:20 AM
@Andrei Salavei thanks, so for me the header only contains 2 items - the getter and setter.
a
Andrei Salavei
07/08/2024, 11:28 AM
Just wondering, do you have access to properties from UIKit/Foundation frameworks in Kotlin iOS target?
Something like:
Copy code
val url = NSURL(string = "<https://google.com/search>")
val isSearch = url.path == "search"