> Can you elaborate on what you mean with “keep your umbrella under control”? Do you mean that we shouldn’t share too much because of app size concerns?
The umbrella should contain only necessary content for the iOS application (or not too much), for example, ktor declaration shouldn’t be inside the umbrella.
The bigger the umbrella is; the bigger and longer the build time of the binary is; we can see the difference in release build, your CI/CD will thank you.
This is something that must be taken care as soon as possible.
Tips: use a dedicated Kotlin module that is accessible only from iOS (not the one shared with Android maybe) or use internal/private code visibility to avoid the code to be exported to iOS.
> You said that we can share Kotlin mocked data but that means that the entire Umbrella will be pulled in. This is my question. Will that degrade the developer experience for iOS when using previews or is the performance impact negligible?
Not necessarily, on my first point, if your mocked class contains simple data type, it’s not an issue.
> You also say that now the preview and the app share the same kmp library. What was it before? Is there anywhere I can read more about it? Would you be able to tell me approx how large your XCFramework is that you use with previews?
youtrack.jetbrains.com/projects/…/KT-70158/KMP-SwiftUI-Preview-not-working-with-Xcode-16-beta
> My colleagues have a practice that they don’t expose any external dependencies (for example Firebase) in their UI modules because they don’t want to degrade performance. Are you saying that this is not a concern any more and they don’t have to be as careful anymore?
It’s not a concern I guess, it should not be used in your preview, or I didn’t understand your question well ?
> Let me know if you have any resources that I can learn more about Swift previews and performance (especially if there have been performance improvements in later Xcode versions)
I don’t have any resource to share, only my experience, I had the same kind of project as yours, and as an iOS developer, I’m taking care of the dev experience.
Tips: You can take the power of Gradle by conditioning your build, for example, if your build is in Debug (from env vars), implement a dedicated module for mocked data (or else), you have the flexibility of Gradle with KMP.