See the entire conversation

The harsh reality of SwiftUI in 2022 is that it doesn’t enable a competent dev to build a better app. It gives you a lesser-than-native, less-reliable, less-compatible, less debuggable app — a two-tier system where 3rd-parties may never be able to compete with Apple’s own
60 replies and sub-replies as of Mar 11 2022

Short of major advancement at WWDC22 wrt to reliability, configurability & back-compat, I’m not sure SwiftUI will ever be the right technology for my apps. Its priorities are clearly elsewhere, and that’s OK. But that isn’t the future of anything, just a lower entry point
I am super excited by the idea of SwiftUI, but, having used it for two years now in practice it’s just not the right tool for the jobs I want to work on. It might have a second life on realityOS, but iOS/macOS isn’t the one
It does not feel at all like SwiftUI was built by people making products. It feels like it was built by tooling people to provide a minimum viable product to keep developers from straying to React or the like. A really great learning tool, though, and ideal for beginners
Where I see a great potential (an actual usability today) is side by side with UIKit, not replacing it. I can’t imagine building a large SwiftUI app, but building separate screens/elements and embedding in UIKit is great. For me, the strategy is coordinators and ViewModels +…
…UIKit and UIHostingControllers everywhere, where it makes sense/is possible. This allows for getting the benefits of SwiftUI, but not being dependent on it. We do that in our app (iOS 13+) and it works great.
Agree. Innovation on mobile has come to an end and Combine, Swiftui are just to keep devs busy
I would love to see your thoughts on a specific write-up of SwiftUI's shortcomings. We componentize our work over here @nbc, and we're using SwiftUI for decoupled view logic with great success. It's not perfect, but our UI is not simple, and it has been a great success.
I’m using it across all the platforms, and it just doesn’t hold up. I think you can get away with iPhone, but it falls apart when you’re talking touch/mouse/keyboard and larger, more-complex layouts, plus the myriad of backwards compatibility problems it creates
Great feedback. You're right here as we don't deal with the mouse/keyboard input as much, save for iPad, but that's under-utilized. I still feel, for UI layout, it is a solid system and leaps and bounds above Auto Layout. But I see your point very strongly, and that's fair.
Interesting. I’m a JavaScript/React developer with a need to do some mobile apps. Was leaning towards React, but do you think SwiftUI, or something else, would be a better starting point?
Just use react native if you already know react
I really don’t get all the gatekeeping that the iOS community is able to display with every innovation
I’m no ST-S, but MaskerAid is basically all SwiftUI and I’m pretty proud of it. 🤷🏻‍♂️ To each their own.
that’s orthogonal to the problems SwiftUI faces as ‘the future of Apple’s platforms’, though. SwiftUI falls apart when you go far beyond the complexity of a phone. Its backcompat strategy is untenable, especially on platforms like macOS that don’t have iOS upgrade cycles
I don’t entirely disagree with anything you said tonight, ESPECIALLY the “these people don’t dog food”. I just wanted to point out it’s not 100% garbage. 🤷🏻‍♂️
I share the same thoughts as you, but do you think SwiftUI could evolve in a way where it will be more reliable, easier to debug and better to use in iOS/macOS?
I honestly don’t know; I don’t think we’ve seen the kind of improvements we would have needed to see over the past 3 releases to suggest that it’s even moving in the right direction. It’s not even close to fully-baked
I really, really hope they introduce a way to backport the SwiftUI features which just expose pre-existing UIKit functionality. Ship it as a shim library or something? It’s silly that UIKit has things that didn’t get enabled in SwiftUI, but might this year… but only for iOS 16.
Ideally they’d go beyond that, and add more SwiftUI functionality too, and at a more regular cadence than just major iOS releases…
Really sad to hear this @stroughtonsmith. What do you feel are the big missing pieces stopping SwiftUI from becoming polished?
Personally I’ve yet to see a declarative UI framework (eg, SwiftUI) that empowers developers as much as imperative frameworks (eg, UIKit) do. Declarative just leaves too much up to an undebuggable black boxes. UIKit will always be more powerful. I do hope I’m wrong though.
I largely agree with this. What it *does* do, is enable less competent/new devs to make pretty good apps. I feel like Apple cares about this aspect more? Feels more in-line with their education push to get young folks into coding - low barrier to entry 🤷🏼‍♂️
Lol elitist comments
I, myself, am a less competent, new dev 😂 Steve can vouch for that ;)
SwiftUI is the only tech I’ve ever used that simultaneously blows me away with how amazing and fun it is and then makes me want to throw my computer out a window
But immediately before that you’re like
Try react sometime.
In my experience React is mostly the latter
React is good. React Native is violence
It depends on how far deep my useState hooks go.
Swiftui is amazing for prototyping quickly and product design at times. It has issues definitely but there’s no need to lose sophisticated legos like collectionview since uikit is usually accessible with the repräsentables
It’s when you’re deep into a SwiftUI design and you need to do something simple in UIKit (like hiding a keyboard on scroll) that then requires you to weep and look up which hack of the week is now recommended
That's the thing about magic. It's magical until you need to know how it works. Then it's a mystery.
I have the exact same experience after building a small app with almost 100% SwiftUI, the exception is a part that I had to build with UIKit to workaround an issue.
Yup, it’s great, until you hit a wall. And then another wall… and then another… and another…
Im having an absolute blast developing with SwiftUI... _not_ using a single List, NavigationView, NavigationLink, etc.
How do you drag to reorder items in a list? Reimplement from scratch? What about pushing a view onto a navigation stack?
That’s the point. I get none of those things. I wanted illustrate exactly what Steve is saying. SwiftUI is awesome for lots of things. But not building a real platform native app
What do you mean by lesser-than-native?
How is SwiftUI "lesser than native" when it’s built over the system UI frameworks?
because it doesn’t give you access to the things that you need to make your apps work as well as native apps, and it has a whole bunch of implicit, unremovable behaviors that cause all kinds of issues
I’d be interested to hear what you’re missing, I’ve made a pretty in depth macOS app with SwiftUI and didn’t really miss anything, except maybe some key event apis
I went full SwiftUI last year for my personal projects and my experience has been that it has allowed me to build better apps than I would have built using UIKit in the limited time I have.
Isn't it their version of React or Flutter? To me, it seems great for people coming from web development. I am incorporating some of it, but yes, to me, it is way slower to do simple things, but it may just be me.
As a web *and* native developer - I freakin’ love Swift UI. Building apps the old way feels so slow and fragile by comparison. I agree Swift UI is far, far from perfect, but it’s still the easiest, fastest way to build apps IMO. The reusability alone is worth the struggle.
I mean UIKit has been around since 2013 so I’m sure SwiftUI will come around given a few more years. Like you said, they have to push SwiftUI (even if it’s immature) to keep up with cross-platform frameworks like Flutter, because those are getting good fast
I have the same feeling since it’s launch. And even today, it still doesn’t attract me even if I try to go towards it. Because if I want to make big products, I feel limited & lost with what SwiftUI provides as of today.
Agreed. It feels more like a fun toy with loads of guidance. As soon as you want to make something slightly different to Apples design language, it becomes very difficult.
Pretty weird state of affairs. I wished it was open sourced, so at least we could improve its shortcomings
i’ve been using SwiftUI in production for the last 1.5 years and have to largely disagree ever since iOS 14 (hard pass on the iOS 13 bugs with it though). however, i often wrap it with UIKit whenever something feels harder than it should be. Works out well
I'm still deep in UIKit, but I'm looking forward to getting to know SwiftUI. Does it interop nicely? Like can I keep all the VCs in UIKit with auto layout, and just build single Views in SwiftUI?
As long as you’re ok with ignoring Autolayout errors. I get tonnes of those in my SwiftUI views and it’s like “what would you like me to do with that info…exactly?”
can not ignore autolayout errors
To be clear they are those ones you get in the debug console about it having to break constraints to make things work. Not actual compiler warnings but still. Weird