HI all. I've got a KMP project targeting ios and a...
# multiplatform
b
HI all. I've got a KMP project targeting ios and android. I've run into some conflicts in terms of static vs dynamic linking for the ios framework. I'm not sure what the best path forward is, and I'm curious what others are doing. 1. I have been using the CrashKiOS library from Touchlab for handling crash reports in Crashlytics. It has [an issue](https://github.com/touchlab/CrashKiOS/issues/69) currently that requires static linking to make it work. 2. I've been looking to switch to the NSExceptionKt library from @Rick Clephas. It did have the [same issue](https://github.com/rickclephas/NSExceptionKt/issues/12), although it looks like a new version was released just yesterday that may work with dynamic linking. 3. But using static linking is a problem, because of [this issue](https://youtrack.jetbrains.com/issue/KT-70158/KMP-SwiftUI-Preview-not-working-with-Xcode-16-beta) where static linking of KMP frameworks causes swiftui previews to break in Xcode. So, I'm curious what others are doing to mitigate these issues.
e
Hey i used this to implement Crashlytics into my Compose Multiplatform project and it worked : https://medium.com/gitconnected/firebase-integration-in-kotlin-multiplatform-6c45e15d234a Maybe because it shared the UI too?
f
This is a paid article! đź’°
@Bradleycorn The issue is still here. You have some workaround : • Build in dynamic when you’re working, then switch to static when delivering • Don’t use Kotlin Type inside the view with preview, means create more DTO or more Views struct (Kotlin->Swift)
I don’t think it will be fixed by JB (because of xcode), as the priority is CMP
b
I don’t think it will be fixed by JB
That's unfortunate. For now, I have dynamic linking working "end-to-end". I removed CrashKiOS in favor of the NSExceptionKt library by @Rick Clephas. It has support for dynamic linking. So far, so good 🤞
👍🏻 1
@David Everlöf See my original post above.
đź‘€ 1