These are excerpts from my (ongoing) series about cross-platform Swift:
https://davidederosa.com/cross-platform-swift/
The series revolves around how I'm porting Passepartout, my Swift/SwiftUI VPN client, beyond the Apple ecosystem.
The simple applications are the final outcome of the series: native frontends with a shared, cross-platform Swift library.
- simple-apple-app is a SwiftUI app built with SwiftPM.
- simple-android-app is an Android app (Jetpack Compose + Swift) that runs from Android Studio without any additional tools. It relies on my CMake tools for Swift.
All apps share the simple-library target.
Simple replacements for Combine subjects with AsyncStream and Swift 6 Concurrency. The motivations are described in this article.
Examples of typical situations involved in Swift/C interop. Showcase the use of opaque pointers. Read these articles for more insights.
Patterns to expose a C ABI from a Swift library to a non-Swift application. Read the articles about integration.