:kotlin_emoji: Hi folks! Small survey from our tea...
# multiplatform
e
K Hi folks! Small survey from our team about ObjC interop. I will appreciate your votes and feedback! Q: In your experience with Kotlin/Native development, have you ever had to use the
@Suppress("CONFLICTING_OVERLOADS")
annotation (documentation) to suppress errors when overriding methods from Objective-C protocols and classes? 1️⃣ Yes, I’ve frequently used it in my projects. 2️⃣ Yes, I’ve occasionally used it in my projects. 3️⃣ Yes, I have used this annotation, but only in samples, not in real projects. 4️⃣ No, I have overridden Objective-C methods, but I didn’t use this annotation. 5️⃣ No, I have never overridden any Objective-C methods. If you have used this annotation, please share in 🧵 what specific protocols or classes methods you overrided.
4️⃣ 7
1️⃣ 2
3️⃣ 1
5️⃣ 18
2️⃣ 10
r
I have used this annotation (some time ago) with Core Bluetooth related code, e.g. CBCentralManagerDelegate.
v
For mobile: WKWebView navigationDelegate:
Copy code
object : NSObject(), WKNavigationDelegateProtocol {
            @Suppress("CONFLICTING_OVERLOADS")
            override fun webView(
                webView: WKWebView,
                didCommitNavigation: WKNavigation?
            ) {
                onPageStarted()
            }

            @Suppress("CONFLICTING_OVERLOADS")
            override fun webView(
                webView: WKWebView,
                didFinishNavigation: WKNavigation?
            ) {
                onPageFinished()
            }
..
t
Using it for functions in
CBCentralManagerDelegateProtocol
AVCaptureVideoDataOutputSampleBufferDelegateProtocol
Copy code
CBPeripheralDelegateProtocol
NSNetServiceBrowserDelegateProtocol
SKPaymentTransactionObserverProtocol
m
I used it when implementing
MKMapViewDelegateProtocol
.
a
UITableViewDelegate
is another example where the annotation is needed
l
Why do you want to know which ones we have been overriding?