Live data from Hacker News

The Swift SDK for Android

swift.org

31–40 of 298 posts

Re: The Swift SDK for Android

#32
post #30
post #15

I would love if I don't have to port my whole iOS app to Android manually. How exactly would this integration work if say business logic is handled by Swift - I'm guessing UI and SwiftUI would not be supported initially? My app [0] uses a lot of metal shader code - I'm guessing there's no easy way to bring that across? [0] https://apps.apple.com/app/apple-store/id1545223887

It'll take you thirty minutes to port the shaders with a modern LLM. I am not joking. I have done this. Shaders are pretty simple. You'll have some weird artifacts but thats more because of platform differences than translation errors.

[dead]

Re: The Swift SDK for Android

#33

What does this mean for React Native? Is Swift now going to be the de facto language for Mobile (and maybe Desktop) development?

I last used RN half a decade ago, but from what I see around me - our frontend developer, who is proficient in React, actually chose to use Flutter for our iOS and Android mobile apps — and he’s quite satisfied with it.

Re: The Swift SDK for Android

#34

I think people will get excited about this and then quickly realize how painful it is to code in a foreign environment from the platform. How miserable it would be trying to write Java or kotlin targeting iOS apps. I think this will be the same. Just use the native tools and languages for the platform. Swift/Objc/xcode for iOS. Java/Kotlin/Android Studio for Android. You will be so much happier.

This depends entirely on how well the thing you're using bothered to support multiple platforms.

Browsers are pretty much the gold standard here, ironically. You might have to care if it's Firefox or Chrome but it's very rare for you to have to care if it's Firefox on Windows or Mac or Linux. It's exactly why React is simultaneously horrible and everywhere.

So it can be done, it's just a question of whether that framework has done it well, ideally while also doing other things well (unlike React).

Re: The Swift SDK for Android

#35

> Over 25% of packages in the Swift Package Index already build for Android That's... not encouraging.

I'm pretty happy with that number, considering this ecosystem is _brand new_. This is the lowest it'll be.

Yes and any package dealing with UI is automatically disqualified, so 25% really is pretty good.

Re: The Swift SDK for Android

#37
I hope they actually stick with this. Swift embedded, for example, is a sort of proof of concept more than viable platform, and you end up battling that more than the problem you are trying to solve.

It is a shame because aesthetically Swift is easily the nicest of the modern safe languages, but there have been really odd noises in the community about project leadership that sour things.

Re: The Swift SDK for Android

#38
I'm a big lover of Kotlin Multiplatform, but I think this is pretty cool anyway. I could imagine making a native Swift library shared between the platforms for memory-sensitive work. I'm not sure about using it to write an app's entire business logic, KMP is going to be more mature for a while for this.
Post reply on HN