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

A lot of good news recently for swift. I am a bit jealous as my go to language C# / .NET is recently not announcing fancy things.

I really like swift going beyond Apple. Particularly the port to android is IMHO crucial, however, now they are in the UI cross platform hell. Let us see if Apple is playing this better than Microsoft. Unfortunately, I have little hope. The only native contenders in the field right now are IMHO are react native and flutter which are both UI toolkits first and language second. Which I find gruesome.





It'd be nice if Apple made SwiftUI cross platform and I'd be singing in the streets if UIKit got ported, but that seems unlikely at best.

I believe that there's strong community interest in some kind of Swift UI framework for Android, though, and so there's a substantial chance that a third party solution will appear.


Correct me if im wrong, but isn't the pain points for mobile devs, the need to have intimate knowledge of both pl to build & maintain a good "backend/functionality" of the app over time and that the UI portion of the app is quite simple to learn, build and maintain.

So is it necessary for the swift team to try get swift ui onto android, versus a developer building their app "backend/functionality" in swift, compiling it down for both ios and android, then bridging the android bindings with a UI made in kmp etc

I recently learnt that amo and protonmail use this solution but instead of swift android, they were using uniffi-rs and seemed to have great results, I think proton ditched react native for this solution, which to me sounds like a more streamlined way of getting native performance without needing the overhead of managing multiple language. I guess we will have to see how mature swift android gets and if it can replace uniffi-rs etc which would save even more time


Do you have a link that talks about Proton Mail's use of UniFFI-rs? A quick search didn't turn up anything.

here is a reddit thread about it: https://www.reddit.com/r/rust/comments/1nq3vk9/proton_mail_r...

the proton mail team claimed they will write a technical writeup soon


I’d absolutely love it if they made SwiftUI cross platform for both mobile and desktop. Flutter is nice but it’s still sort of a mess sometimes when targeting desktop instead of mobile.

SwiftUI is also a mess when targeting desktop (macOS).

Let’s be honest. It’s a mess targeting iOS. It’s like the old days with VB - first 80% done in no time, last 20% takes forever, requiring ever more elaborate hacks to get around stupid restrictions (eg try hiding the keyboard associated with a TextField when you tap on a Picker).

> It'd be nice if Apple made SwiftUI cross platform

It's a nearly impossible task. Just ask Qt, who have been at this for thirty years.


Qt has grown so huge that I rather choose Tk or GTK for cross platform GUI.

i would love to see how Swift will do cross platform gui.


SwiftUI is more realistic actually. UIKit, much tougher (more mature, more tied to the IOS ecosystem).

Highly doubt it, Safari on Windows ran on AppKit and that thing is from the early 1990s. You'd be surprised how high level UIKit actually is.

Source?

Don’t have links, but it’s true. iTunes for Windows also includes chunks of AppKit.

The Windows ports of AppKit in both likely trace their lineages back to Yellow Box, which was the Windows port of AppKit that Apple briefly made available prior to the release of OS X 10.0.


My understanding was Foundation and bits of CoreGraphics but not AppKit. Yellow Box required DPS.

skip.tools is one third-party solution for creating Swift + SwiftUI apps for Android today.

It still translates SwiftUI to Kotlin+Compose, right? Very cool and useful, but not quite the same as a Swift-based UI framework for Android.

Oops, TIL Jetpack Compose doesn't use Android native controls. That is unfortunate.

Jetpack Compose is just as "native" as Android views at this point; it hooks into the same accessibility frameworks and renders to the same surfaces as the framework toolkit. This isn't like Flutter which renders to an opaque Skia buffer.

Great! I appreciate the claification, thank you.

UIKit is very mature and tied to the iOS ecosystem and a bit more complex. SwiftUI is easier to port (since it is still a incomplete / subset features of UIKit).

From what I've read, SwiftUI is using parts of UIKit under the hood, so it also doesn't seem too likely.

Yes historically but not by design. It's more of a transition tactic.

Starting with iOS 26, new UIKit and AppKit features are implemented by "native" SwiftUI (specifically, Liquid Glass's implementation). In recent years they have also been replacing UIKit/AppKit-backed SwiftUI views with "native" SwiftUI implementations.

But besides this technical change I don't think Apple has any desire to bring SwiftUI to other platforms.

BTW: https://skip.tools has bridged it to Compose. Your SwiftUI code runs in native Swift on Android.


> I am a bit jealous as my go to language C# / .NET is recently not announcing fancy things.

Depends on what you think fancy things are. Both C# and .net are busy releasing a lot of features.

You're forgetting that C# is a 25-year-old language at this time. The exciting features they release are things like "access native memory allocation in a GC language", "native Arm64 support", "support for post-quantum cryptography", "tensor support" etc. while already running on all the platforms that Swift is only now announcing as achievements.


Yeah, also the ecosystem, aspire, ef core, Orleans, ML.NET etc..at this point I don't know what's really missing.

I guess it's a matter of perspective. Dotnet 10 just came out[1] with a bunch of solid new shiny that I'm enjoying.

And, as it stands, Dotnet is much further along in the multi-platform game than Swift. As far as I know, none of the Swift-based UI stuff is being ported to, let alone going to be usable on non-Apple platforms.

1. https://www.c-sharpcorner.com/article/whats-new-in-net-10/


Not yet, still release candidate, not the final release.

Today :)

Swift is a “may you live in interesting times” kind of deal. Not the kind of stress you want in your day job.

Speaking of .NET, I've been successfully running .NET 9 on AMD64 FreeBSD. It's nice to have that choice.

I donnow. C# and .NET are amazing. People tend to ignore it because Microsoft, but they are being short-sighted. What shiny things are you missing?

> The only native contenders in the field right now are IMHO are [...] and flutter

I wouldn't really call Flutter "native".

I don't have a strong enough grasp of where React Native is at now. It was severely lacking when I looked at it circa 2018. But then we needed to call in to our own native code libraries, so we were probably quite niche.

Xamarin.Forms worked well enough, but the transition to MAUI has been full of woe and even more bugs and weird edge case functionality than Xamarin had.


Aspire, extensions everywhere, field variables, spans as part of the type system, and naturally plenty of AI, isn't fancy enough?

>The only native contenders in the field right now are IMHO are react native and flutter which are both UI toolkits first and language second

Flutter is not a language.

https://en.wikipedia.org/wiki/Flutter_(software)

From that page:

>Flutter apps are written in the Dart language.

>https://en.wikipedia.org/wiki/Dart_(programming_language)


most know that, it's implied to simplify the phrasing.

just mixing appkit and language in the same phrase implies swift.


This is a blessing and a curse. I, for one, preferred Swift from before, when it wasn't hell bent on replacing C++.

It was a simpler Swift, I could understand all of it. Just look at the explosion of keywords in Swift.




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

Search: