Everything compiled on Android. Then the iOS build died with a Swift error about argument labels, and the label it complained about had an odd trailing underscore. This post explains what happened in three of our Kotlin Multiplatform apps, the exact condition that triggers it, the exact condition that does not, and the cheap way to avoid it for good.
The error that only shows up on a Mac
On the first iOS builds of a small utility app, the Kotlin side compiled without complaint and the Swift side did not. The build ran on a cloud Mac, so there was nothing to poke at locally. The message said that two things had different argument labels, and the method it pointed at was showInterstitial. Swift expected a label written onDone with a trailing underscore, while our Swift code had written it plainly, as onDone.
A trailing underscore in a label is the kind of detail you only notice when you stare at the log for a while.…