Join Slack
Powered by
should I write actual implementation in Kotlin onl...
# multiplatform
h
Hasan Nagizade
05/11/2023, 3:37 PM
should I write actual implementation in Kotlin only?
a
Anum Amin
05/11/2023, 5:52 PM
expect and actual are kotlin specific paradigms. If you want to access native code from actual, may be you can expose it to your kotlin class
h
Hasan Nagizade
05/11/2023, 6:36 PM
@Anum Amin
how can I call Swift library from common code?
j
Jeff Lockhart
05/11/2023, 6:38 PM
Kotlin doesn't have direct Swift interop, only Objective-C. You can call Swift code that has been annotated
@objc
.
r
russhwolf
05/11/2023, 9:08 PM
You can also use an interface instead of expect/actual. A Swift class can implement a Kotlin interface.
h
Hasan Nagizade
05/12/2023, 8:14 AM
thank you very much
4
Views
Open in Slack
Previous
Next