expect/actual is not an interface, and the difference shows up at link time
An interface is resolved at runtime by an instance. expect/actual is resolved at compile time by the source set.
We use Google Analytics to see which pages help people. No ads, no profiles. Privacy Policy
Compose, Kotlin, and multiplatform work — the mechanism under the symptom.
296 posts
An interface is resolved at runtime by an instance. expect/actual is resolved at compile time by the source set.
Every public declaration in the shared module becomes Swift API. internal is the design tool.
The driver is a one-line expect/actual. Threading, file location, and the OS deleting your file are the rest of it.
Registration is common. The bindings are not. DI defers the error to first use, which is usually on a user's device.
Obj-C has no namespaces. Everything exported is prefixed and flattened, and each Kotlin idiom loses something specific.
Kotlin objects held by Swift are ARC-counted. A loop through both runtimes is invisible to both profilers.
Android and JVM targets cache well. Native link steps mostly do not, and that asymmetry is where your CI time goes.
You configure one connect timeout. OkHttp, NSURLSession and the browser each enforce a different thing with it.
Permissions, biometrics and share sheets all need something shared code does not have: a host that outlives the call.
No reflection on Native, so the serializer is generated. Sealed hierarchies work; open polymorphism needs a module you register by hand.
Swift cancels its Task. The Kotlin Job never hears about it, so the work keeps running.
A consumable with no recorded lifetime is indistinguishable from a service that is down.