28 ms·
Apple’s Use of AppKit, Mac Catalyst and SwiftUI in macOS
- whywhywhywhy 4y agoBoggles my mind that as they rewrote preferences to match iOS not one person said “hang on, is this design even any good on iOS?” Because honestly I find it impossible to find anything in it and the search doesn’t even work reliably.
- skygazer 4y agoInterestingly, the search index in iOS Settings is not based on localized UI strings, as one would assume or hope, but on keywords that are updated independently of the UI as a neglected afterthought. So, while it’s technically “reliable,” you’re right that it can’t be relied upon.
- jbverschoor 4y agoYup. and basically all apps (re)created suck big time. They're just iOS ports. You're forced to do litereally everything using your mouse, and for example the Home app, it's basically useless if you want to organize/edit things. We're going to a CRUD operation world, where you have to do every edit one-by-one. And then in a few years, people will be amazed that you can save so much time because of a new "bulk editing" feature. Ahh such great times with Office in the 90s.
- pjmlp 4y agoBasically Apple pre-OS X.
- yakubin 4y agoI started using macOS with Big Sur (still on it) and I don't understand why Apple would remove the ability to select buttons in dialog windows with the keyboard. I've googled it and it seems you used to be able to do that on macOS, but when I follow the instructions on Big Sur, I can't move the selection from the button active by default to the other one (e.g. "Ok" vs "Cancel"). That means my right hand is making runs between keyboard and mouse all the time. Very unergonomic.
- grishka 4y agoThe enter key activates the blue (default) button, the spacebar activates the one with the focus ring around it. You can move the focus ring with tab.
- yakubin 4y agoExperiment: 1. Open TextEdit.app 2. Type some random characters. 3. Attempt to quit with Cmd+Q. 4. A dialog box shows up, prompting you to save the file. Hitting Tab just cycles between the "Save As" and "Tags" text fields. There is no way for me to select the "Delete" button with Tab. Challenge: quit TextEdit.app in that situation with they keyboard, without using the mouse, and without saving a file. That's a broader topic btw: Apple's apps often make the Tab button only cycle between text fields. In Safari when logging into Spotify I can't reach the "Remember me" checkbox with Tab. It only cycles between the login and password textfields and the URL bar. Luckily, other browsers don't have this flaw.
- Shank 4y agoI believe this is possible if you turn on "Use keyboard navigation to move focus between controls" in System Preferences -> Keyboard -> Shortcuts. I have no idea why this isn't on by default.
- yakubin 4y agoThat works, thanks! Although there is a weird bug that going forward with Tab cycles through everything and goes back to the first field, whereas going back with Shift+Tab stops at the first field.
- ykhan6 4y agoThanks for this. I thought I was losing my mind having to grab my mouse every time I tried to quit a text editor and not save.
- cr__ 4y agoCMD-Delete almost always serves to press the Delete button or the equivalent in those dialogs. Not sure how you're supposed to find that out though!
- deleted 4y ago[deleted]
- hbn 4y agoI hate this consolidation of mobile and desktop apps and I hoped Apple would have had the design sense to keep them separate like they should be. Mobile and desktop UIs are two different worlds with different interaction paradigms. Trying to combine them makes an awkward UI that feels good nowhere.
- Arcanum-XIII 4y agoYup, but you forget the famous "develop once, deploy everywhere" that will give the user "a consolidated experience". And allow you to make huge economy on the cost of development. At least they don't suffer from the "it's working on Electron and on the web", meaning it will not run any good anywhere. Same result at the end though...
- 90minuteAPI 4y agoSupposedly a major justification for the continued separation of Mac and the others (especially iPad) was differing UI interaction patterns. So what are they doing now? Using tools that evolved to serve touch-first interfaces to build desktop applications. The Mac/iPad split grows more confounding with every iteration. Now it feels like familiar desktop features are being reimplemented poorly in both iPadOS _and_ macOS.
- clairity 4y agoit’s not that confounding when you consider that iphones dominate apple’s earnings, and so apple wants to unify the platforms under ios (via ipados) rather than under macos where they have no app store lock-in.
- yazaddaruvala 4y agoIt shouldn’t be confounding. It seems clear: Apple views the Mac as an iPad with an attached keyboard and optionally cooling. There will be touch on the Mac very soon and they are preemptively getting the Apps ready. The whole Apple Silicon migration is to facilitate this merge of macOS and iPadOS. As soon as the 3 year migration to Apple Silicon is complete and most developers have stopped relying on Rosetta, Macs will have touch and there will be no longer two OSs.
- carlycue 4y agoIn 2021, the Mac grossed $30B. iPad ($30B) and iPhone ($196B) together grossed $226B. Mac users might think they're still the most important part of Apple but it turns out, the Mac is quite insignificant compared to Apple's mobile OS's when you put things in perspective. I am still surprised that Apple is pouring resources into the Mac. Nowadays, smartphones and tablets are the main computer for 90% of people. The sooner Apple rebuilds Xcode from the ground up for the iPad, the quicker we can get rid of the Mac with its decades of legacy baggage.
- cpach 4y agoAs a Mac fanboi I wish I could refute your argument, but… those numbers are pretty telling.
- feifan 4y ago$30B is still A LOT in absolute terms
- api 4y agoThe iPad can't replace the Mac unless I can run my own software on it outside the App Store. Part of the definition of a "real computer" is that it's truly general purpose. Anything not meeting this requirement is a special purpose device or at most a "console," which is the category I place iOS devices into.
- cglong 4y agoUnfortunately I don't think a lot of people understand the implications of this distinction.
- imwillofficial 4y agoThat argument is shortsighted. Classic business school thinking. No consideration of second order effects or long term strategy. Sure, that’s where things stand today, but the Mac is part of Apples brand. They screw it up enough and iPhone won’t win on its strengths anymore. Design and execution. You’re on top of the world… Until you’re not.
- rvanmil 4y agoI remember making fun of Microsoft trying to combine mouse and touch in a single UI. And yet here we are, Apple doing the same thing to macOS, resulting in the same shit desktop/mouse experience that macOS has become. I understand the reasons but it seems so incredibly un-Apple to sacrifice UX for this.
- Razengan 4y agoAs someone who literally abandoned Windows for the same reasons (during 8), macOS is still far far from sinking into those depths of depravity yet.
- Nextgrid 4y agoMy worry though is that when Windows fucked up, Mac OS was a viable alternative. Now that Mac fucks up, what's the alternative? Linux has its own challenges.
- Kwpolska 4y agoThe viable alternative is Windows, as pretty much all the tablet nonsense is gone in Windows 10 and 11.
- Nextgrid 4y agoWindows is absolutely not an alternative. The UI degradation we're complaining about in the Mac has already happened in Windows - I mean they've now got 3 different UI paradigms for system settings and the newest one is this disgusting phone-style UI full of whitespace. Ads and "suggestions" everywhere don't help either.
- Apocryphon 4y agoFreeBSD, hopefully https://news.ycombinator.com/item?id=32492514 https://news.ycombinator.com/item?id=32492514
- api 4y ago
- WoodenChair 4y agoIt's really not an impressive showing for SwiftUI. 4 iterations later and after being told it's "the future" in unequivocal terms, it's still at 12% (and only like 3% without any AppKit combined (last chart)). It's not dogfooded for any productivity apps. For Ventura, rewriting "Font Book, System Settings, and Tips" is not exactly confidence inducing. If they rewrote Pages or Final Cut Pro, that would wake people up. One showcase productivity app. The thing is, in its current state, I don't they can.
- conradev 4y agoWhy would they rewrite Final Cut Pro in SwiftUI? Rewriting code is a large effort and a waste of time without proper justification – new developer tooling for UI is not usually a good enough justification to rewrite the entire UI
- WoodenChair 4y ago> Why would they rewrite Final Cut Pro in SwiftUI? Rewriting code is a large effort and a waste of time without proper justification – new developer tooling for UI is not usually a good enough justification to rewrite the entire UI It's not about Final Cut Pro specifically. It could be a new app. It's about having a single showcase complex app that says to developers—look hey we can build something really performance intensive and sophisticated in SwiftUI. We're dogfooding it. Look what can be accomplished with it! It could be anything—Final Cut Pro, Logic, Pages, Numbers, a new productivity app all together. Some showcase sophisticated, complex productivity app to show what can be done with it and we're in the trenches with you using it.
- conradev 4y agoAbsolutely! So you need to align that goal with a project that is actually going to provide value to the end user. There aren’t enough new features each year to (re)write large portions of macOS UI. The Shortcuts app in macOS 12 and the Settings app in macOS 13 are almost entirely SwiftUI and the most substantial projects in this regard
- alexashka 4y agoMeh. Apple has near infinite resources, it can do whatever it wants. The rest of industry has moved on to Electron and keeps bucking, trying to get react native or some other cross platform thing to work well enough on mobile. Apple itself uses webviews for complex UI in their desktop Music app. Are there any non-trivial apps Apple has created from scratch in the past decade using its own libraries and frameworks? No, right? Why should anyone expect the libraries they themselves don't need or use to be any good?
- trinix912 4y agoElectron is not a good option either. It defeats the entire point of making a desktop app in first place. It's slow, wasteful, abstracts too much of the filesystem away for a desktop app, doesn't integrate into the OS, doesn't use the OS-provided UI widgets, etc. etc. It also depends on what you mean by "non-trivial". For me, something like Final Cut Pro is non-trivial. I'm yet to see that kind of thing (one that's actually used, not just a PoC) done in either Electron or Apple's Swift framework-of-the-year.
- alexashka 4y agoI hear you on the downsides of Electron. The upsides are that there is a plethora of ready-made UI and backend integration solutions to choose from and an abundant pool of candidates to hire from, for a reasonable wage. I don't think there are more than 1000 people worldwide who have shipped a moderately complex mac-native app within the past decade. Apple doesn't seem to think it a problem - they're well on their way to becoming a company people despise but continue using, like Microsoft, Google and the rest of em.
- lapcat 4y ago> I don't think there are more than 1000 people worldwide who have shipped a moderately complex mac-native app within the past decade. This is grossly mistaken. The Mac App Store, which is only 11 years old, is by itself empirical refutation of this claim. Also, I believe your claim is also mistaken that "Apple itself uses webviews for complex UI in their desktop Music app." Where do you get that from? I don't mean to be rude, but your other comment "I've mistakenly conflated Electron with webview use" strongly suggests that you're not technically sophisticated when it comes to analyzing Mac app binaries. No Mac developer would ever make that mistake. (I think we can safely assume that you're not one, considering that you think there are only 1000 worldwide.)
- koinedad 4y agoSwiftUI has been a pain to learn because it’s young and you still need to learn UIKit or another framework to get unsupported tasks done. So basically need to learn the old frame and the new just to use the new. At least that’s been my experience not knowing the older frameworks myself.
- spike021 4y agoSame here. Have had to use UIViewRepresentable a few times to make use of UIKit features that SwiftUI doesn't support. Specifically, MapKit is incredibly barebones in SwiftUI, so I couldn't use it at all. Had to use an MKMapView through a UIViewRepresentable instead; this is so I could do things with custom overlays, even as simple as paths between two coordinates.
- dangelov 4y agoI recently took to rewriting what should be a very simple app from Obj-C to Swift with SwiftUI - because it's the future. The CPU usage was at 5% while idle, just for having a simple tiny pie chart that updates. Not to mention that for some seemingly basic things I still had to use AppKit anyway. Wrote basically the exact same thing 1 day later in Swift with AppKit and NO SwiftUI and it sits at 0% CPU usage with less code complexity. Maybe in a few years I will give SwiftUI another try.
- skavi 4y agoIt’s depressing how few developers would even notice that performance degradation, let alone go back in and fix it.
- fingerlocks 4y agoWas this with the debugger attached? Did you do any further profiling in instruments on a release scheme to determine the cause of the cpu usage? You should be able to narrow it down to the specific sys calls.
- nikanj 4y ago”Premature optimization is evil” is dogma, but you can’t keyhole optimize the architecture after the fact. Just like cars, you can’t build a Kia Soul, and then just replace a few parts to reach Ferrari-like performance.
- odshoifsdhfs 4y agoDid you find out what was causing it? I have developed 'heavier' (aka 50k lines of code) applications in SwiftUI on mac and it mostly sits idle (0-1% cpu based if it is doing some regular background stuff). Heck, I just created a quick Charts based app from an online example on Mac and stays at 0,0%. Is it possible it is re-rendering the view hierarchy due to some data invalidation you haven't noticed?
- interactivecode 4y agoIs this app open source? I would live to poke around and see the difference both in code and performance
- jarjoura 4y agoThe iPodification of the Mac has been so utterly jarring to me. Little nuances in productivity have been reduced to accommodate porting over a platform that was designed for touch. Microsoft tried for a decade to merge touch design in a desktop space and it was whole-heartedly rejected in the marketplace. Funny that Apple has been trying the same thing long after I get the sense that it no longer matters. I'm not against the idea of unifying the underlying frameworks, but they went with a lowest common denominator approach. In my mind, that is a failure of execution on their part.