Per the Swift/ObjC interop docs: > The names of...
# multiplatform
b
Per the Swift/ObjC interop docs:
The names of Kotlin classes and interfaces are prefixed when imported to Objective-C. The prefix is derived from the framework name.
Is there a way to customize/override the prefix?
x
does the framework baseName not work? (as seen here)
Copy code
binaries {
  framework {
    baseName = "Demo"
  }
}
b
doesn’t seem too
I have a module named “adw-program” In it’s build.gradle.kts, I have:
Copy code
listOf(
     iosX64(),
     iosArm64(),
     iosSimulatorArm64()
    ).forEach {
        it.binaries.framework {
            baseName = "TheProgram"
        }
    }
but in my swift code, classes still use a prefix of
Adw_program
l
the frameworkName is different than baseName. You should be able to set the name you want through
framework(name) {}
k
Not quite the same but you can customize class names using @objcname https://kotlinlang.org/docs/native-objc-interop.html#name-translation