Zvonimir
10/30/2024, 7:54 AMIdentifiable
protocol. What's the best way to achieve this without adding an id
property directly to the Kotlin sealed class? Are there other good options?Tadeas Kriz
10/30/2024, 5:57 PMIdentifiable
simply by conforming to the protocol, so you can add:
extension YourKotlinClass: Identifiable { }
into your Swift code and it'll work. It makes it identifiable by it's identity, so two class instances differ if their ===
returns false.
You can use SKIE's Swift bundling to add this directly into iosMain/swift
so you don't have to deal with it on the iOS side.