If you are building an iOS app with Kotlin Multiplatform (KMP) or Compose Multiplatform, you might have opened your generated Shared.h header at some point and wondered why it is 20,000+ lines long.
I ran into this recently while optimizing one of my personal KMP apps. I kept seeing Objective-C classes generated for every single theme color, dimension constant, and internal state model, even though my Swift code never touched any of them.
To get a clear picture of what was actually going on, I built a small Gradle plugin called kmprofiler. It parses the generated Objective-C header, scans your Swift source files, and highlights which exported declarations have zero call sites in Swift.
The numbers on my app caught me off guard, but cleaning it up took just a few minutes.
Why does Kotlin/Native export so much?






