186 points · by Timac · 6y ago · 131 comments
I made the mistake of choosing iOS and SwiftUI for the first platform of a niche app, a few months ago. Trying to do things in the way Apple wants seems a good strategy in general, but the experience was bad in countless ways. The developing&publishing approval barrels don't help. I succeeded, but only by throwing vastly more experience and energy at it than should've been necessary.
One of the engineering culture surprises was realizing that a lot of iOS developer chatter seemed to be repeating PR talking points, rather than the frank critiques that I'd expect in analogous situations in many other software development communities.
Besides a theory of fandom or Stockholm Syndrome, or dreaming of a job at Apple, or fearing being deplatformed... maybe there's an incentive for someone with hard-earned knowledge in something marketable to play along and be reassuring about their own expertise in it?
This tends to be overestimated. There's rarely a good reason to fear criticism. Apple is too huge to notice you, unless you're famous yourself. Also, Apple is a very bureaucratic organization especially now. The App Store editorial team is in its own silo and doesn't necessarily pay attention to this, and isn't influenced by other teams within Apple (except when top executives step in, of course).
Ironically, the rational fear of criticizing Apple comes not from Apple retribution but rather from all the random little Apple fans jumping all over you for criticizing Apple.
You've already made up your mind if you're just going to slap such labels upon anyone who disagrees. Frank critique doesn’t thrive in echo chambers, and your preemptive polarization is just as guilty of such bias, just in the other direction.
What term should we use for your camp? "Haters?" "Lazy devs who don't bother to learn the intricacies of a new platform and expect stale knowledge they studied 10 years ago to apply everywhere?"
Electron is that way and have a nice day.
> Your comment is refreshing.
jamil7's GP comment was literally 2 sentences just saying "I'm disappointed, half-baked, bugs."
Disappointed how? Half-baked how? No details, just a string of some negatives and that's enough to make you happy. "Someone who agrees with me! Everyone else must be an Impostor!" (little Among Us reference there)
SwiftUI is a monumental project. Does any serious developer with real-world experience expect long-standing technologies like AppKit/UIKit/Cocoa/etc. to be completely supplanted within 2 years?
Any developer worth their bits would immediately notice the extensive support for incrementally adopting SwiftUI in legacy projects, or selectively falling back to existing tech in SwiftUI projects. You’re not supposed to go all-in if you're not fully comfortable with it, or if it doesn't serve all your needs yet.
And anyone even casually glancing at Apple SDKs will sense that this -is- the future. It's honestly fucking amazing to be able to target macOS, iOS, iPadOS, tvOS, watchOS and soon the rumored AR glasses with like 70% or more of the same code. Best of all, it not just spits out native widgets on each device (unlike Flutter or Qt), but also automatically adapts to the paradigms of each form factor (like navigation pages on phone/watch/TV versus sidebars on Mac/iPad).
Not to mention the rich support for adding internationalization and accessibility features to your app at a low cost, something that other major frameworks and companies generally ignore.
Yes, there are bugs. Yes, the documentation is appalling in many places. Yes, Apple doesn't communicate very well.
But hot damn, SwiftUI is the most refreshing UI framework I've seen since WPF, which Microsoft didn't even dogfood as much as Apple has done with their tech (both Swift and SwiftUI are already being used in core features of their OSes).
Shit that would take me a week on other frameworks I can now throw together in a day with SwiftUI, live previewing and incrementally improving and targeting multiple devices as I go.
I am not going back to any other framework. I would rather put my projects on hold if SwiftUI cannot handle them in its current state, than the other way around. The grass may seem greener on the other side for now but only because it's growing from a pile of rotting cow turds.
How's that for Frank Critique
Fundemental building blocks of SwiftUI are broken and have been since it's annoucement, List, NavigationView and NavigationLink for example – these are the basis of SwiftUI apps and need attention from Apple developers, I've reported bugs, memory leaks and performance issues with these and they've been acknowledged, maybe they fix them during iOS14's lifecycle but maybe not. We got some much needed features at this years WWDC but I would have also liked to see these fundementals addressed and maybe even rethought (navigation). It's not like we're talking about a volunteer open source project here, we're talking about the future flagship UI framework for 2 trillion dollar company. Run and profile Apple's own Fruta example app if you want to see what I'm talking about.
When it works, then yes like I said I can't imagine a faster way of building for Apple platforms. But right now I would warn others not to adopt it at any meaningful scale for another 2 years.
https://www.folklore.org/StoryView.py?story=Calculator_Const...
Hopefully they improved/will improve the docs.
For now it is possible to use standard API (C/C++, Posix, OpenGL, Vulkan)
But I have a bad feeling about this.
Meanwhile, the majority of the system remains based on C, C++, and Objective-C (accessible via C) APIs, the same that many of the other languages and frameworks tap into to access Apple's higher level frameworks.
Why the sudden fear and trepidation?
Let’s end the FUD.
Via the languages forced into game devs from platform SDKs.
C# and Java can be considered, at best, as branches in this evolution scheme.
C++ is by far the dominant language to create games today, and IMHO, for the foreseeable future.
Google tried to force every dev to use Java on Android for a while, but they finally and reluctantly added the NDK (C/C++) so that game devs would port their engines and games.
Oh the arguments how it was an heresy to even think contaminating the source code with C++ constructs.
Track down any C vs C++ flamewar on Usenet back in those days.
NDK exists since Android 2.0, hardly anything new, as is currently more castrated than on those days.
It is impossible to create a production level game engine in Android without reaching out to Java, given the API surface.
Game devs will use whatever the platform owner puts them on the table, when the platform is enticing enough to refuse being part of the party.
Just like if enough Indies make money with HTML 5 games, some bigger studios will eventually suck it up and use JavaScript, WebGL, and whatever tooling targets WebAssembly.
However, looking at the abysmal quality of apps they have been releasing on MacOS in the past few years, I wouldn't hold my breath.
In the past few years we've had anything from the new native AppStore that doesn't have a single consistent behaviour [1] to the plethora of half-baked barely functioning app stubs in Swift UI/Catalyst [2]. These are first-party apps by Apple themselves, and they are perfectly fine with the state they are in, and they had no qualms whatsoever when releasing them. That's what "obsessive attention to details"[3] has been on the Mac for the past many years.
The very few examples/exceptions (Big Sur's Messages) are exactly that: very few.
[1] https://grumpy.website/post/0RsaxCu3P and https://grumpy.website/post/0RsafwyK8 and https://grumpy.website/post/0SpwtkNB_
[2] Home, News, Podcasts, Developer App...
[3] That's from BigSur's marketing video
At the same time, they have been adding Mac features to iPadOS to make it easier to make a full-featured iPad app closer to a proper featured Mac app. One example there would be mouse/trackpad support. Another would be the multitasking support which, for all of its UX weaknesses on use, makes variable sized, multi window applications available on both platforms.
Messages is an example of the medium-term game Apple is playing here. I anticipate a large number of the built-in apps to be (finally) a single code-base under a single team. They are gaining more capability to do easy, deep customization per OS in each release - but also seeing the systems themselves move closer in terms of UX feature set.
Mac apps released by Apple have been a mishmash of very inconsistent design lately, most people in the Mac enthusiast community even agree with this (think Gruber, Marco, etc.)...
You're not talking about Big Sur, right? Because the contrast for that has gone waaay down for that in this release.
Mind, Mavericks is still a lot better than both...
It was like pulling teeth trying to convince developers to use Swift.
https://h4labs.wordpress.com/2016/02/09/should-i-use-objecti...
The “shiny new toy” argument doesn’t hold for long with Apple. You quickly get left behind in the Apple ecosystem if you don’t move with Apple.
While every language, environment, etc doesn’t need to move this fast, I personally prefer to jettison legacy sooner.
Huh? That was not what I witnessed at all. A lot of people were quick to adopt Swift when starting new projects, but still didn't replace Objective-C on the older ones. IMO it was one of the sanest language migrations I ever witnessed in this industry. (Java to Kotlin in Android also as nice and same, IMO)
Considering Apple still has a large Obj-C legacy, I doubt we'll see it deprecated any time soon. Carbon for example took almost 12 years to be removed!
The number of binaries and frameworks in iOS 14 using Objective-C vastly exceeds this relatively small list. Objective-C hasn't been jettisoned by Apple by any stretch of the imagination.
True, but melling didn't say that Objective-C has been jettisoned.
My understanding is that you can't iOS home screen widgets in Objective-C, correct? If so, isn't that a reasonably-clear signal that Objective-C developers are starting to be left behind?
I don't know, I haven't looked into them. But Swift is now more than 6 years old, and iOS home screen widgets are literally only days old, so I'd say "You quickly get left behind in the Apple ecosystem" is an exaggeration.
I did a lot of ObjC, but I've enjoyed using Swift. When I create frameworks and modules, they are Swift-only (no ObjC headers), because I like to leverage native Swift stuff, like enums and whatnot.
But I am writing app code. I think ObjC is a better systems language, so I don't think it's going anywhere, any time soon. It's a lot safer than "raw" C.
To me, Swift is a fairly high-level language, and I like that. I cut my teeth on the bare metal, and don't really miss working at that level.
I'm probably going to be all-in on SwiftUI but it does make me nervous -- what if Apple decides the bugginess level is acceptable and you should just code around it if you don't like it? That's a pretty terrible outcome for people like me who are investing now in the ecosystem.
Well, there are all kinds of apps written in SwiftUI.
It might not be ready to write Photoshop or Final Cut Pro in it, but most apps aren't "serious" like that. Heck, apps written in even less supported/mature environments (like React Native) will be just fine...
In what language do you think Metal and Core Audio are implemented?
https://www.objc.io/issues/18-games/metal/
C++ is used for Metal shaders.
Most newcomers won't even know it exists.
For Swift it's a modern language that doesn't need to have backward compatibility with C that Objective-C had. It has a very expressive syntax and uses modern idioms you see in JS, Kotlin, Rust, Scala, C#, etc. It has a modern type system with type inference, string templating, Option type, tuples and simpler closures. It's pretty nice actually.
SwiftUI is just a way of writing UIs using Swift and a reactive paradigm. It looks and feels like React but instead of the embedded HTML of React it only uses plain Swift. The previous recommended method used XML (in XIB files) and needed special tooling (Interface Builder), which was nice but not perfect. Also doing git merges in the XML files are much harder.
That doesn't seem accurate. Interoperability with C and Objective-C was a fundamental design requirement of Swift. C interoperability is not particularly pleasant in Swift, but it's certainly there. It has to be there.
Apple has been creating some easier to use Swift wrappers around old UNIX C API. For example, their Network framework, and the just-announced Swift System.
Objective-C is a superset of C, so any valid C code is also valid Objective-C code, including all the pitfalls and footguns.
This is similar to the relationship between C and C++, however C++ isn't strictly a superset of C.
https://github.com/zhuowei/marina
The code itself is pretty easy to understand: https://github.com/zhuowei/marina/blob/master/marina_html.sw...
I think SwiftUI is still settling, so I expect to see more movement in this are in the short-term future. But I don't see Apple releasing an HTML-emitting-SwiftUI by themselves.
This isn't really true. Interface Builder was an alternative to writing UI code, but programmatic UI is still allowed and is well-supported. Many developers prefer it to IB.
Use IB to build small components and highest-level layouts.
Use code for everything in between, as well as individual views.
Yeah and that's exactly what I would call a disadvantage. I prefer dumb programming languages like Java, C++11 without the auto keyword, and Objective-C. They're much easier to understand because there are fewer ways to achieve the same thing and they don't require keeping as much context in your head while reading the code.
IRL example with Swift: I wanted to fix a logic bug in someone else's code and spent an hour trying to get a field from an object. I could see it in the debugger but every way to get it I could think of produced an uninformative syntax error. There was nothing to google because there were no keywords around it, even. Then the author of the code in question came online and explained that it's an "enum with associated value" (wtf?!) and you have to use this `if let` or `case let` abomination to extract the fields into local variables.
Another IRL example with Swift is that this whole immutability-by-default thing was just driving me insane because I'm too used to the fact that I can overwrite function/method arguments but Swift won't ever let me.
Associated values with enums are very powerful features of the language.
That's still a massive language; the part you removed makes it basically be C++03 but even worse :/
1. Modern language with conventions that will feel "normal" to ambitious younger programmers.
2. Lots of special language features to support the specific use-cases of iOS apps. As Go is to writing for server farms at Google, so is Swift to writing for Apple devices.
3. Very simple UI programming paradigm, at some point, maybe now? SwiftUI is or isn't production-ready depending whom you ask, but if we treat this as the future for iOS then it means any kind of data-centric or CRUD app will be trivial to bootstrap.
4. Sooner or later you will have no choice.
Granted, #4 is not an advantage to the language, but maybe to learning it?
Consider it's also possible to use other languages like JS/TS (via React Native, Phonegap, etc), Dart (via Flutter), C# (via Xamarin) or even Delphi (via Embarcadero RadStudio), among others, so even in the unlikely event of Apple deprecating Objective-C, choice is not really going away.