top | item 45698728

(no title)

chrsstrm | 4 months 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?

discuss

order

objclxt|4 months 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

thenaturalist|4 months ago

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

joanniso|4 months ago

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.

samtheprogram|4 months ago

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.

brookst|4 months ago

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.