Skip to content

Instantly share code, notes, and snippets.

View har5hit's full-sized avatar
📱
Building Awesome Mobile Apps

Harshith Shetty har5hit

📱
Building Awesome Mobile Apps
View GitHub Profile
@har5hit
har5hit / SuspendFunctionsFromSwift.md
Created August 3, 2022 20:25
Calling kotlin suspend functions from Swift

Works

Suspend function can be called from swift on Main thread. Examples:

// Sample.kt
suspend fun add(a: Int, b: Int): Int {
    return a + b;
}

// Sample.swift