Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


> 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


What 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-a...


The 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.


Isn't it kinda a bad sign that people on HN have to argue in comments about what your library/framework/sdk even does?


The 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/) 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.


The reverse is slowly becoming a possibility. Jet Brains just announced another improvement with Swift Export. https://kotlinlang.org/docs/native-swift-export.html

But it's not there yet


An 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/

(disclaimer: I work on the Skip.tools product)


Not 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.


No, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: