5 ms·
I'm just getting started in iOS development as a hobby, but what does this mean? Can I now build my app in Xcode with an Android target and use that binary in t
by chrsstrm 11mo ago
I'm just getting started in iOS development as a hobby, but what does this mean? Can I now build my app in Xcode with an Android target and use that binary in the Play Store? It surely can't be that easy now is it?
- samtheprogram 11mo agoNot yet, and possibly not ever quite from Xcode. But using Swift CLI tools, yes. The example Activty I saw is pretty rough ergonomically, but I have no doubt an ergonomic, SwiftUI-like library could be built on top of what’s currently there and/or on the roadmap.
- objclxt 11mo ago> Can I now build my app in Xcode with an Android target and use that binary in the Play Store? No. The vision document[1] lays out the direction of travel. Currently the focus is on shared business logic and libraries, rather than full native applications (although that's certainly a goal, albeit a very long term one). [1]: https://github.com/swiftlang/swift-evolution/pull/2946/files https://github.com/swiftlang/swift-evolution/pull/2946/files
- thenaturalist 11mo agoWhat do you mean? This doc you linked is from August. The blog post from today includes, in fact at the very top an XCode Swift project emulating a Pixel 9. The docs include a detailed Getting Started for Android and they even have an Android examples repo. Hence the SDK. By all means, it very much is possible to build Android Swift apps in XCode. https://www.swift.org/documentation/articles/swift-sdk-for-android-getting-started.html https://www.swift.org/documentation/articles/swift-sdk-for-a...
- joanniso 11mo agoThe post doesn't display Xcode but Android Studio. While with Skip you can build & run through Xcode, that's not something we support right now. You can build the Swift part in Xcode, VSCode or your favorite editor. But the Android builds don't work with Xcode today.
- Culonavirus 11mo agoIsn't it kinda a bad sign that people on HN have to argue in comments about what your library/framework/sdk even does?
- brookst 11mo agoNo, it’s just an Android compiler and standard libraries. Same way there are C compilers for Windows and Linux, but that does not mean binary compatibility.
- joanniso 11mo agoThe SDK doesn't quite work that way, your iOS-specific dependencies like SwiftUI and UIKit aren't available. For SwiftUI development, [Skip](https://skip.tools/ https://skip.tools/) has a transpiler that translates your SwiftUI code into Jetpack Compose. Without Skip, you can still share other code through JNI - similar to Kotlin Multiplatform.
- Larrikin 11mo agoThe reverse is slowly becoming a possibility. Jet Brains just announced another improvement with Swift Export. https://kotlinlang.org/docs/native-swift-export.html https://kotlinlang.org/docs/native-swift-export.html But it's not there yet
- marcprux 11mo agoAn example of an Android app that is built using the Swift SDK for Android and is available in the Google Play Store is Skip Showcase: https://github.com/skiptools/skipapp-showcase/ https://github.com/skiptools/skipapp-showcase/ (disclaimer: I work on the Skip.tools product)