0Pricing
Kotlin Multiplatform Academy · Lesson

@ObjCName & Swift-Friendly APIs

Shape exports so Swift call sites read naturally.

Make Swift Devs Happy

Your shared API should read naturally in Swift. A few annotations and habits make the bridge feel native, not bolted on.

Rename with @ObjCName

The @ObjCName annotation lets you give a type or function a different name on the Swift side without renaming the Kotlin one.

@ObjCName("UserService")
class UserRepository

All lessons in this course

  1. How Kotlin Maps to Objective-C
  2. Suspend Functions as Swift async
  3. Collect Flows from Swift
  4. @ObjCName & Swift-Friendly APIs
← Back to Kotlin Multiplatform Academy