markturnip
06/10/2024, 4:47 AMexpect/actual
? Rather than using Obj-C interoperability? For instance I wish to build a Downloader package where the iOS platform specific is written in Swift. This could also go as far as building a package which depends on another remote Swift Package.markturnip
06/10/2024, 4:50 AMmarkturnip
06/10/2024, 4:51 AMBernd Prünster
06/10/2024, 5:25 AMsettings.gradle.kts
like so:
pluginManagement {
includeBuild("swift-klib-plugin")
}
markturnip
06/10/2024, 6:25 AMmarkturnip
06/10/2024, 6:26 AMPablichjenkov
06/10/2024, 6:58 AMPackage.swift
file?Jacob Ras
06/10/2024, 7:51 AMPablichjenkov
06/10/2024, 8:10 AMmarkturnip
06/10/2024, 2:22 PMBernd Prünster
06/10/2024, 4:47 PMmarkturnip
06/12/2024, 1:43 AMmarkturnip
06/12/2024, 1:44 AMPablichjenkov
06/12/2024, 2:18 AMNOTE: At the moment, Kotlin is not directly compatible with Swift. Therefore, you can only connect Objective-C libraries that have a Swift package file.
Although the gradle tasks are handy.Pablichjenkov
06/12/2024, 2:24 AMmarkturnip
06/12/2024, 4:20 AMPablichjenkov
06/12/2024, 5:07 AM.swift
files in the umbrella but rather providing them in a separate swift package).
I also was looking for embedding swift files in the generated KMP .xcframework as a solution for distribution. But I ended up realizing what these plugins do, you can achieve it manually in Package.swift.
The solution I use, relies on manually creating an abstraction bridge(lot of interfaces in kmp side) in the umbrella framework. Then the implementations of these interfaces will live in a swift package on some repo in GitHub.
The consumer project will integrate the umbrella.framework(either locally or remote hosted) and will also include the swift package with the actual implementations.
At compile time Xcode will resolve all the dependencies.markturnip
06/17/2024, 8:29 AMBernd Prünster
06/17/2024, 8:50 AMmarkturnip
06/25/2024, 7:30 AMmarkturnip
07/09/2024, 1:00 PM