100 Days of Kotlin Multiplatform

In progress 62 posts October 16, 2026

Contents — page 3 of 3

Day 89A framework builds for one architecture. iOS consumers need an XCFrameworkA simulator-only framework works on your machine and fails on the device, and the error names a missing architecture rather than the packaging decision that caused it.9 minDay 90appleMain exists only if your targets justify itThe hierarchy template inserts nodes based on declared targets. A directory for a node that does not exist compiles nowhere and warns about nothing.10 minDay 91Dispatchers.Main throws on a target you forgot to configureMain is supplied by a platform integration, so it exists on Android and iOS and fails at runtime on desktop tests — a crash whose message names a module, not a mistake.10 minDay 92The coroutine that kept collecting after the screen was goneAndroid cancels viewModelScope for you and SwiftUI does not. One scope, two lifetimes, and only one of them has a callback that fires when the screen ends.11 minDay 93Nothing reconnects your WebSocket, on any targetA dropped socket is a normal event with no exception on some engines. Reconnection with jitter and a resume token is application code, and it is the same code on all four.10 minDay 94Your HTTP cache exists on two targets and is a stub on two othersOkHttp and NSURLSession cache to disk, the browser's cache is the browser's, and the common engine has none. Measured hit rates differ by a factor nobody budgeted for.10 minDay 95The transaction that was atomic on Android and not on the webNested transactions, savepoints and write locking vary per driver. Code written against one driver's guarantees loses them silently on another.10 minDay 96Back means four different things, and shared navigation has to pickA hardware button, an edge swipe, a window close and a browser history entry are not the same event. One shared handler gets at least two of them wrong.11 minDay 97The text field that dropped characters on one target onlyIME composition, autocorrect and hardware keyboards reach Compose differently per platform, so state hoisted too far loses keystrokes on exactly one of them.11 minDay 98Your dependency graph has six entry points and one of them runs twiceApplication.onCreate, a Swift app init, a main function and a page load each start the graph. Two inits on one platform is a duplicate-definition crash at the worst moment.11 minDay 99One version, four numbering schemes, and a release that could not be rolled backA monotonic integer, a build string, a semantic version and a cache-busting hash have to agree. Deriving all four from one source is the only shape that survives a hotfix.11 minDay 100We shared 60% of the code and one platform used all of itMeasured per target rather than per line: the iOS app reached a third of the shared surface because the API was shaped around Android's lifecycle.11 min