Adi Robertson (in June 2021):
The Computer Fraud and Abuse Act (CFAA), a controversial anti-hacking law which bans “exceeding authorized access” on a computer system, was narrowed by the Supreme Court on Thursday in a 6-3 ruling. The court said the law shouldn’t cover people misusing systems they’re allowed to access — and that claiming otherwise would criminalize a “breathtaking amount” of everyday computer use.
Department of Justice (via Bruce Schneier):
The Department of Justice today announced the revision of its policy regarding charging violations of the Computer Fraud and Abuse Act (CFAA).
The policy for the first time directs that good-faith security research should not be charged. Good faith security research means accessing a computer solely for purposes of good-faith testing, investigation, and/or correction of a security flaw or vulnerability, where such activity is carried out in a manner designed to avoid any harm to individuals or the public, and where the information derived from the activity is used primarily to promote the security or safety of the class of devices, machines, or online services to which the accessed computer belongs, or those who use such devices, machines, or online services.
NoSpamPlease:
So they’re saying security research actually is A Crime under CFAA, but they just promise they won’t go after you for committing that Crime, right?
Doesn’t give me a warm and fuzzy feeling…
MrC:
No, that’s not correct. The policy memo is a straightforward, good-faith instruction to USAs not to prosecute certain categories of potential CFAA cases because (a) SCOTUS’s new Van Buren precedent says they do not fit within the CFAA, or (b) they are near enough to Van Buren that, if called upon to resolve such a case, courts would likely say they do not fit within the CFAA, or (c) even if a court could maybe be convinced not to dismiss the case under Van Buren, such a prosecution wouldn’t serve to vindicate the government’s interest in “promot[ing] privacy and cybersecurity by upholding the legal right of individuals, network owners, operators, and other persons to ensure the confidentiality, integrity, and availability of information stored in their information systems.”
Department of Justice (DOJ) Legal Security
Jake Sawyer:
Even if you already know a bit (or a lot) of SwiftUI, Stanford’s course is incredible, amazing, wonderful, AND FREE!
Nick Lockwood:
Half the iOS devs on my TL keep posting stuff like “here’s how I shipped an amazing full-featured cross-platform SwiftUI app in 10 minutes and the other half are like “Button presses have been broken in SwiftUI for 16 months and Apple hasn’t responded to my radar”
Greg Pierce:
My SwiftUI development process starts with a clear definition of the problem and ends in a recursive loop of Google searches trying to figure out why the thing I did to fix A broke B, and the thing I did to fix B, broke C, etc.
Jonathan Badger:
As a newbie to the framework, I enjoy the instant feedback that the canvas preview provides with each code modification and am thoroughly impressed by the elegance and simplicity of SwiftUI’s design. That being said, I have run into odd behaviors and challenging problems that make me want to tear my hair out at times. One such issue, which at first seems trivial, is how to dismiss the keyboard when a user taps an area on the screen that is outside the bounds of a TextField or TextEditor view. Here, I will discuss a few of the common issues surrounding keyboard dismissal and provide two solutions and workarounds that I have found after an embarrassing amount of googling and combing of StackOverflow
Christian Selig:
Has anyone done a nice blog post on integrating SwiftUI as parts of an existing UIKit app and having them communicate nicely? (Many posts are all or nothing) Integrating it for bits and pieces sounds fun, but a bit intimidating. 😬
Scott Anguish:
It’s a nightmare. That’s what we found.
Steve Troughton-Smith:
SwiftUI remains incompetent at basic layout, something Playgrounds users are going to find out the hard way… 😅
Ron Avitzur:
I’m stuck diagnosing an infinite loop in SwiftUI layout for code that worked on macOS 11.
Steve Troughton-Smith:
I’m really excited about using SwiftUI in my apps.
SwiftUI is an unreliable mess that needs to be treated with oven mitts, and I won’t be increasing my reliance on it anytime soon.
That dichotomy is what makes the SwiftUI story so frustrating.
Oskar Groth:
We’re halfway into SwiftUI 3 and this is yet another example where it fails to provide us with a properly working default control.
Ron Avitzur:
Today in C++ → Swift: macOS 12 SwiftUI Focus
.focused($focus, equals: .mathBlock(id))
is not setting the first responder to my NSViewRepresentable
NSView.
Should I expect it to?
Anyone have insight into how AppKit first responder interacts with Swift Focus for custom views?
Adam Kaump:
“Hey I got 90% of what I wanted really quick! Neat!”
“…oh turns out that last 10% is basically impossible, eh?”
Marco Arment:
I like a lot of it. But it’s not simple, easy, or mature.
Its conceptual elegance and clean presentation-slide code are quickly ruined by common real-world needs.
And you frequently slam HARD into walls that you just can’t overcome.
Steve Troughton-Smith:
I really do feel like every time I use SwiftUI, even in the simplest of places, it’s burying mines in my code that will be set off at some point in the future
[…]
Conundrum: do I spend the hours required to try different combinations of SwiftUI modifiers to hopefully find a fix for this layout issue, with potential of it breaking again in the future, or do I spend same hours porting to UIKit knowing I’ll likely never have to touch it again
Simon B. Støvring:
I wouldn’t use SwiftUI for core parts of a complex app yet but it’s safe to say that Runestone wouldn’t have so many settings if it wasn’t for SwiftUI. It’s so simple to build settings screens that look decent with SwiftUI.
Josh Avant:
Today, 2.5 years after release, there’s still validly a more-than-small amount of opinion that SwiftUI is not even Production Ready for mature, complex applications.
If you have to make the choice today, I say choose UIKit.
(Unless your app isn’t intended to be mature, complex)
Helge Heß:
There is very much to like about SwiftUI (and almost all my recent apps use it), but e.g. that it can’t do a very core and basic thing like navigation in its 3rd iteration properly is just embarrassing. 🤷♀️
Helge Heß:
The real difference is that one may have been missing API you’d want (not really), while SwiftUI has API all over but the provided stuff isn’t just bad but simply doesn’t work. Often even depending on context - i.e. it is an inconsistent mess from an API perspective.
Sam Deane:
SwiftUI lists can get really slow, due to all the clever diffing that goes on for animation.
There is a workaround, but it seems that it stops working if you put the list inside a NavigationView
.
Let’s use value types instead of objects and then allocate a UUID for each one since they no longer have pointer identity.
Paul Haddad:
It’s still terrible, takes at least twice as long to do anything for results that IMO are not as good as UIKit.
Hoà V. DINH:
I’m going to rewrite an app that I wrote with SwiftUI back to regular Swift + UIKit because I’m hitting so many blockers when refining the details.
Marin Todorov:
💯 internet points for
@steipete
for making a landing page for this SwiftUI crasher that you didn’t cause and can’t fix 👌🏼
Russell Ivanovic:
Let’s play a little game called “Will the SwiftUI preview load?”. It’s ok if you’re not an Apple Developer, you can play along!
Marco Arment:
A day building in SwiftUI:
I would like a search bar in the navigation bar like every app
Oh that requires iOS 15
I would like it to activate when presented
Can’t do that without rebuilding with UIKit hacks
I would like it not to hide itself
Can’t do that, go back to UIKit
For every hour SwiftUI’s niceness has saved me, I’ve probably lost two more hours to the slow and buggy tooling, scouring the web to make up for its non-discoverability and poor documentation, hacking around its brick-wall limitations, or giving up and rewriting things in UIKit.
Phillip Caudell:
Writing SwiftUI is like riding a bicycle downhill on a beautiful sunny day.
Until the bike suddenly explodes, killing you.
It makes building a production app in SwiftUI extremely difficult when the basic system controls don’t work.
There’s so much to love about SwiftUI, but still after several years the basics are still buggy as hell.
Ken Kocienda:
A tool like SwiftUI which can’t easily handle simple and well-understood tasks isn’t likely to scale to more complex and experimental tasks without seemingly endless frustration.
Steve Troughton-Smith:
Abstracting developers from the ‘real’ goings-on is also a means of control on Apple’s part, to shrink us down into a little sandbox we can’t break out of. Can’t compete with system apps if we only have toy APIs
Michael Love:
Seems like an especially self-destructive policy on Apple’s part in this case, because it’s not clear they have much of a vision for what to actually do with AR apps and by abstracting us away they’re going to make it impossible for developers to help come up with one.
Ron Avitzur:
Today in AppKit → SwiftUI:
.keyboardShortcut(.upArrow)
does not work with .buttonStyle(PlainButtonStyle())
but .leftArrow
and .rightArrow
do work
.upArrow
works with .buttonStyle(BorderlessButtonStyle())
.
Filed under: I do not even want to know the explanation behind this.
Kyle Howells:
I can’t help feeling SwiftUI was a massive mistake for Apple.
I keep seeing blog posts and articles of people trying to write native iOS or macOS apps, using SwiftUI, abandoning it as: too buggy/much work/effort/not worth it.
And then switching to Electron & React Native.
If Apple had just spent its effort on updating UIKit, adding more standard UI components modern apps use/need.
Improving Xcode’s tooling, bug fixes. They’d have 1 really nice "reliable" toolset for people to use.
Kyle Howells:
This is my main issue with SwiftUI. It’s a high level black box.
With UIKit I can: drop down to UIControl
easily if I want to replace UIButton
; make my own table view, drop down to CALayer
’s, customise the CALayer
a view uses, etc....
Kyle Howells:
And there in lies the problem of why I can never see SwiftUI is a real/full replacement for any UI framework.
Either it needs to allow you full control to build the thing.
Or it needs to be a high level abstraction over top the real thing.
Currently it’s sort of both badly.
Ron Avitzur:
@FocusedValue
as seen in macOS menus is not changing reliably when switching windows despite my best attempts. However, setting a global in response to NSWindow.didBecomeKeyNotification
seems to work just fine.
Majd Taby:
We WERE going to include a SwiftUI component in our next update, but alas, I just rewrote it in UIKit.
This was a result of three situations:
1. Incomplete APIs in SwiftUI limiting our capabilities
2. Coordinating the SwiftUI layout updates with UIKit ones was difficult and caused animation problems
3. Our data model wasn’t designed for SwiftUI, and thus caused a lot of CPU thrash
Jordan Singer:
Learning SwiftUI unleashed creativity inside of me like no language ever has and brought joy back to building user interfaces.
Here’s a thread of my experiments to show you what’s possible, to learn from, and code to remix👇
Rony Fadel:
SwiftUI forces you to think more deeply about architecture compared to UIKit.
Abstraction hijackings (e.g. getting a reference to and conditional casting a parent or sibling vc) are not possible by virtue of how SwiftUI works.
Ron Avitzur (tweet):
Is it possible to set the isAlternate
property on an NSMenuItem
in the macOS menubar to implement dynamic menu items in a SwiftUI document-based app which uses CommandMenu
to construct the menus?
Steve Troughton-Smith:
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
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
Rony Fadel:
SwiftUI + Introspect gets us that much👌 closer, but I agree that we’re not there yet.
Right now SwiftUI is a reactive shell on top UIKit with a number of gaping holes (Lists, Navigation, View presentation etc..)
Russell Ivanovic:
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?”
Damien Petrilli:
The Joy of SwiftUI:
Animation in simulator:✅
Animation in Swift Playgrounds on iPad:✅
Animation in the App: freeze and lag.
100% same code.
Khoa Pham:
Just finished refactoring a 115+ screens #SwiftUI app to UIKit navigation. Every screen has its own UIViewController and is self-contained.
Feels so good
As long as SwiftUI is still based on UIKit, using UIKit is a safer bet.
Ron Avitzur:
Looks like it is back to UIKit for the UIPanGestureRecognizer
for me.
Simon B. Støvring:
Many seem to either like SwiftUI or believe that it’ll get better down the road and be the future of UI development on iOS and iPadOS.
Is there a possibility that SwiftUI is simply a bad idea for these platforms? That it won’t work?
I’m starting to fear that as we’re adopting SwiftUI in our apps, we’re also compromising too much. Our UIs are getting simpler but more buggy. We’re becoming slobby.
Maybe it’ll all work out in the end. I hope it will. But this is a fear that I currently have.
Steve Troughton-Smith:
To my surprise (not.), yet another SwiftUI regression has begun to screw with my apps, this time affecting tab-focus and text fields. Appears to have cropped up either in the latest SDK or most recent macOS release. Worked fine when I shipped (& for 2 years), now does not.
I think once I bail on SwiftUI that’ll be it for me for quite a while. I’ll check back in in 5, 8 years, like I did with Swift, and maybe it’ll be tolerable then. I have a lot of development in me before then, and I just can’t base any of it around SwiftUI
Unlike early Swift, which was just clumsy to write but could still make a 1:1 version of your ObjC app, early SwiftUI is radioactive and eats holes in everything it touches. I feel like Apple will be paying this one off for a veery long time
Steve Troughton-Smith:
One place I can recommend SwiftUI: as a preview wrapper for UIKit views & view controllers. This element is hugely useful even to developers who don’t use SwiftUI for any of their code
Kyle Hughes:
In March I removed the last traces of SwiftUI from an app, going back to 100% UIKit. I needed block element support in attributed strings.
In March I also released a 100% SwiftUI app.
Perhaps they are both good.
Chris Eidhof:
I was trying to create an NSImage
out of a simple SwiftUI View
. Turns out to be surprisingly difficult: dataWithPDF
is completely broken, cacheDisplay(in:to:)
has strange artifacts and good old CGWindowListCreateImage
works as expected.
Ron Avitzur:
Today’s API eldritch horror experience trying to implement the macOS Paste menu item so that it is enabled or disabled appropriately depending on what is on the clipboard.
In AppKit, this is very easy.
In SwiftUI, I’m lost in a maze of twisty APIs...
Kuba Suder:
This talk is a bit of a mindfuck… I’m gonna have to watch it more than once. Is it just me, or is it… kinda unintuitive that the lifecycle of state variables in that subview depends on whether you write this as if/else or with ternary operator “?:” ?
Marcin Krzyzanowski:
overpromise under-deliver in one screen. the title itself is almost an oxymoron
Steven Curtis:
Imagine using a version of Xcode with a major memory leak attached to SwiftUI. If it’s Xcode 13 I think that’s fine, they’ll fix in in 13.1. What do you mean, they only fixed it in Xcode 13.2.1?
[…]
I want to decouple navigation from views. I don’t want to use UIHostingController
as I would like to create a completely native SwiftUI App. I need to have easy access to views using deep-linking where the screens depend on complex state, and can be accessed from multiple parts of the App.
James Thomson:
Since installing 12.4, all the labels for my SwiftUI pickers have vanished. Affects my existing versions too. This is a Mac-idiom Catalyst app.
That’s really not great 🙁
Ron Avitzur:
Replacing a SwiftUI ScrollView/VStack with a List View was straightforward and provides swipe-to-delete, and drag-to-reorder rows. However, it also made scrolling the view impossible. Breakpoint on scrollTo does not fire. I fail to understand this.
Paola Mata:
All these hacks and workarounds for making SwiftUI do basic shit…
See also: The evolution of SwiftUI.
Previously:
Update (2022-05-25): Steve Streza:
SwiftUI will be great once it’s production ready. Maybe that will be this year. Until that happens though, this post remains a spectacular cautionary tale of what happens when you go down that road.
Martin Pilkington:
There is a very strong argument to make that declarative UI frameworks are always going to be a case of “faster to get to good, difficult to get to great”
Building great software requires fine-grained control over the UI, but that’s kind of the antithesis of declarative UI.
That isn’t to say you can’t have parts of UI be built declaratively, just that you can’t handle every case people will have with a full declarative framework
Aleksandar Vacić:
I expected such issues back in 2019 (the talk I gave at Pragmaconf) but did not see them taking this long to clear up.
The black box design and complete dependence on Apple to fix issues did not turn out good.
Michael Brown:
This absolutely does not reflect my experience of using SwiftUI. In the 8 months that I’ve been using it intensively the time it has saved me is immeasurable compared to the problems encountered.
It is unquestionably better than using UIKit (which I have used since 2010).
matfx:
I have built a production app for a bank in SwiftUI (released in March 2021) but I can relate to all of things described.
Benedikt Terhechte:
Doesn’t even mention how invalid layouts crash SwiftUI apps at runtime!
vinibaggio:
SwiftUI is such a bummer. While I agree with the feelings that it makes UI development so fun and freeing, when you start running into issues, then the magic is shattered and you’re back to the harsh reality that computers are all broken.
Sam Deane:
I do still like SwiftUI a lot, and am using it in production apps.
I ended up making this to fix the List issues. It is crude but effective and does just enough of what I need.
I do still regularly hit brick walls, but a lot of the time I find them to reflect a strongly opinionated design philosophy, rather than just an accidental omission.
In other words, someone is deliberately preventing you from doing something they don’t think you should do.
R. Mark Volkmann:
I have never used UIKit and am a relatively new user of SwiftUI. So far I love it.
Steve Troughton-Smith:
After @jamesthomson’s tweet, it was with trepidation I upgraded to macOS 12.4 to see how the changes to SwiftUI have broken my own apps. Sure enough, all the labels have been removed from my pickers, in the shipping version of Pastel.
See also: Hacker News.
John Gruber (tweet):
I’d like to see leaps-and-bounds improvements announced this year.
Update (2022-05-26): Luc Vandal:
Overall, my experience with SwiftUI has been mostly positive. Of course there were times I wanted it to die in a but I was able to develop & release an app that is on the App Store & actually selling.
Kevin Hayes:
I’m not blind to its bugs and limitations but it’s definitely a net positive for me. It’s working out well in 1Password 8 for iOS, and my side projects are SwiftUI too.
Francisco Tolmasky:
It requires being an expert in it before you can predict its limitations (which often are bug-related and not necessarily “conceptual”). This would maybe be excusable for a beta release, but SwiftUI is now around 4 years old.
Arguably, its original sin is simply not being open source, and on top of that is trapped behind one of the most opaque bug-reporting mechanisms in the industry. Every minor hack involves tremendous reverse-engineering, which may then have to be replicated throughout the community, instead of being a GitHub issue and PR request like in Electron for example. There are of course upsides to the closed-source model, but in 2022, you have to deliver on those upsides if you want to make a strong case for your framework.
Richard Turton:
If you are working with an existing UIKit codebase and are SwiftUI-curious when it comes to adding or updating new features, this article should help answer your questions. I’m going to cover some of the technical details of how SwiftUI works and how state is managed, some tips on integrating SwiftUI into your existing code, and some common pain points.
iOS iOS 15 Mac macOS 12 Monterey Programming Swift Programming Language SwiftUI Top Posts
European Parliament:
Mobile phones, tablets, digital cameras, headphones and headsets, handheld videogame consoles and portable speakers, rechargeable via a wired cable, would have to be equipped with a USB Type-C port, regardless of the manufacturer. Exemptions would apply only for devices that are too small to have a USB Type-C port, such as smart watches, health trackers, and some sports equipment.
Via Nick Heer:
The straight-line way of reading this is that future iPhones and iPads will have to have a USB-C port instead of a Lightning one.
Casey Newton:
The act applies to what it calls “gatekeepers” — defined as any platform that has a market capitalization of €75 billion, or more than €7.5 billion in European revenue. So: yes to WhatsApp and iMessage; no to Signal and Telegram.
[…]
Disdain for the new requirements is not universal; Matrix, a nonprofit organization working to build an open-source standard for encrypted communication, published a blog post Friday explaining some possible technical paths forward.
But it’s clear that, to the extent that there might be a way for services like iMessage and WhatsApp to interoperate and preserve encryption, that way has yet to be invented.
Via Nick Heer:
To be clear, it does not appear that the draft law mandates the creation of no privacy or security risks; the segment posted by Benedict Evans — the full draft text is currently confidential — says platform providers must create a “high level of security and personal data protection”. It is about finding an appropriate level of risk with the caveat that it will never get to zero. But the core of the question seems correct: is there a way to make encrypted messaging services work together while ensuring negligible difference in security and privacy levels?
[…]
Remember Adium? That is a great piece of software I have not touched in about ten years as phone-centred messaging clients have replaced desktop-based ones. Something like that could be possible again.
Hartley Charlton:
The latest provisional agreement sets out plans to establish a “High-Level Group” of central European digital regulators to coordinate national regulators across EU member states and requires “gatekeepers” to create an independent “compliance function.” The new group must include compliance officers to monitor their company’s compliance with EU legislation using sufficient authority, resources, and access to management, and be headed by an “independent senior manager with distinct responsibility for the compliance function.” The rule would effectively require companies like Apple to set up an internal department dedicated to meeting pro-competition regulations.
In addition, new rules specifically targeted to address companies like Apple that have “a dual role” with control over both hardware and software look to allow any developer to gain access to any existing hardware feature, such as “near-field communication technology, secure elements and processors, authentication mechanisms, and the software used to control those technologies.” This could have major implications for the level of integration that developers can achieve on Apple platforms, such as allowing contactless payment services to operate on the iPhone and Apple Watch just like Apple Pay.
John Gruber:
This is bananas. All third party developers get control over the secure enclave and the software that controls it?
[…]
This is profoundly anti-consumer. Consumers aren’t asking for any of this shit. Actual people love their phones more than their computers — whether Macs or PCs — not despite the fact that their phones are tightly controlled consoles, but because they are tightly controlled consoles. These regulators don’t see it that way, because they’re idiots. They think they can legislate their way to a world where the iPhone (and Android, which is also console-like) remains far safer and more reliable than PCs while mandating that all the protections that have made them far safer and more reliable than PCs be removed. It’s absurd.
I think this is conflating a lot of different things. The main reasons that phones are safer and more reliable are sandboxing (so apps run mostly independently from each other and the system) and the hidden file system (so users can’t mess things up). Those would remain in place. I still think it’s far from clear that adding an API to access NFC would cause harm. The bit about the Secure Enclave strikes me as differing interpretations, like when Microsoft told the court that Internet Explorer couldn’t be removed from Windows because—thinking of the frameworks, not just the app—then it would no longer boot. Obviously, the EU doesn’t want it opened up in a way that would make it useless.
I would imagine though, if this comes to fruition, E.U. citizens are going to wind up buying iPhones that operate very differently from those sold everywhere else in the world, and they will suffer for it.
Steve Troughton-Smith:
Why does Apple see a ‘European’ iPhone variant as an existential threat, but not its stripped-down feature-restricted variant for e.g. China (which it has shipped for a decade)? Because everybody will want one with this unrestricted featureset, of course. Hence the unrelenting PR
Previously:
European Union iOS iOS 16 iPhone Legal Lightning Near-Field Communication (NFC) Secure Enclave USB-C
I recently started using Weathergraph. I’ve been happy with Snowflake Weather on my iPhone, but less so on my Apple Watch. Weathergraph has a great watch app and complication, and it’s even better with the new icon theme and precipitation probability display that were added in the 1.0.96 update. For some reason—maybe the location-based updates—it does not seem to be subject to the watchOS 8.5 bug that prevents my other complications from updating automatically. And, unlike Apple’s complication, it can show the last cached forecast when there’s no network connection.
The basic design feels like an evolution of Weather Line and Weather Strip, but I think Weathergraph shows the information better. The display is very configurable, so I can choose to show wind speed but not wind direction, humidity but not the dew point, and the UV index but not the atmospheric pressure. Unfortunately, the rain percentage is shown as a light blue area with no scale or label, so it’s not clear what the percentage is except in relative terms. I like how you can choose the zoom level and how it can be different for the phone, the watch app, and the watch complication.
The main drawback is that it only supports a single location, which cannot be set manually, so you can’t use it to plan travel. So right now I’m using Weathergraph in combination with Snowflake.
Weathergraph Pro—which includes Foreca, Dark Sky, and realtime forecasts—is $3.99/month, $19.99/year, or $49.99 for a lifetime license. Below are some screenshots comparing it with other weather apps that I have installed.
Weathergraph
Apple
Snowflake Weather
Weather Strip
CARROT Weather
Previously:
App Subscriptions CARROT Weather iOS iOS 15 iOS App Snowflake Weather watchOS Weather Weather Strip Weathergraph
Howard Oakley:
The most compelling argument for retaining HFS+ is on rotating hard disks, because APFS can result in severe fragmentation, most importantly in the file system metadata, so causing degraded performance; as SSDs don’t suffer those performance penalties, this could be a good reason for continuing to use HFS+ on hard disks, while switching SSDs to APFS.
That argument may hold good for storage which is in active use, such as boot disks and those containing working files, but appears less compelling in more static use, to contain relatively stable archives or backups in which there is limited turnover of files or data. Although objectively assessing the effects of fragmentation is fraught with difficulty, one basic question is whether there is any difference in performance between the file systems to begin with.
I updated my spinning hard drives to APFS when that became necessary in order to make bootable clones. The other main benefit is that APFS snaphots on the destination are a great way to fit multiple backups onto the same drive. Previously, I used multiple partitions, which is much less space-efficient.
The hidden downside is that, for reasons I don’t understand, most of my APFS backup drives take an unpredictable amount of time to mount. With HFS+ it consistently took a few seconds. With APFS, sometimes it takes a few seconds, but other times it takes 5 minutes or even an hour before I can access the drive’s contents. A few of my APFS backups do have multiple partitions. They mount in a random order. If I’m lucky, the one I need mounts first, and in that case the backup is almost always done before the other partitions have even mounted.
Sometimes, the APFS volume never auto-mounts, but it does show up in Disk Utility where—after it takes 10 minutes to launch—I can manually tell it to mount.
Other times, the APFS volume does auto-mount, using the password stored in the keychain, but it shows a password prompt, anyway. Sometimes, despite trying to dismiss this dialog, it stays on-screen the entire time I’m using the drive. I try to drag it mostly off-screen so that it doesn’t block my other windows.
Sometimes, generally after a kernel panic, APFS volumes don’t even show up in Disk Utility after a restart. I have to power cycle the enclosures. (Ironically, most of the kernel panics that I’ve been getting with my M1 Pro MacBook Pro seem to be related to HFS.)
Previously:
Apple File System (APFS) Backup Bug Disk Utility Mac macOS 12 Monterey Storage
Howard Oakley:
You don’t have to prepare an APFS volume, as Time Machine will do that for you, but I prefer to make one ready using Disk Utility.
[…]
Time Machine will then prepare its backup volume by making another APFS volume using the case-sensitive option and designating it as a Backup volume.
Howard Oakley:
To distinguish between what are effectively two different systems, I’m going to refer to Time Machine backing up to APFS as TMA, and when backing up to HFS+ as TMH.
[…]
From its release, TMH has been dependent on features of the HFS+ file system to create its Finder illusion. Every hour the backup service examined the record of changes made to the file system since the last backup was made, using its FSEvents database. It worked out what had changed and needed to be copied into the backup. During the backup phase itself, it only copied across those files which had been created or changed since the last backup was made.
[…]
Apple later introduced what it called Mobile Time Machine, intended for laptops which could be away from their normal backup destination for some time. In around 10,000 lines of code, Mac OS X came to create something like a primitive snapshot, but on HFS+.
When Apple released the first version of APFS on Mac OS X in High Sierra, its new snapshot feature was incorporated into TMH. They were initially used instead of the FSEvents database to determine what should be backed up.
[…]
Catalina introduced a more complicated scheme to replace snapshots as the normal means for determining what to back up. This was presumably because computing a snapshot delta proved slow, and the introduction of the Volume Group, with specialist types of APFS volume for which snapshot deltas would be inappropriate or impossible.
[…]
TMA interestingly reverses the design of TMH in High Sierra: instead of using snapshots to determine what needs to be backed up before creating a backup using traditional hard links, most of the time TMA determines what’s changed using the traditional method with FSEvents, then creates its backup as a snapshot on the backup volume. The latter is essential, as without directory hard links, there’s no way of using the TMH method to make backups to an APFS volume.
Howard Oakley:
Once again, the changes required to enable Time Machine backups to be made to APFS volumes appear to have required modifications in the file system. Before macOS 11.0, we’ve always thought of snapshots as being straightforward copies of the metadata for a specific volume, something essentially generated by making a copy of those file system metadata. If that was what Time Machine relied on in Big Sur, then it could only back up whole volumes.
Instead, when backing up to an APFS volume, Time Machine now creates snapshots of individual folders when necessary, a feature which hasn’t yet been made available through the command tool tmutil
. Not only that, but during the process of making a backup, Time Machine copies snapshots between volumes and seems able to assemble a backup snapshot from its file system metadata and constituent items, including changed blocks within a file.
Howard Oakley
Early versions of Time Machine started making backups when they were run by launchd
scheduling (rather than cron
), exactly every hour. When Apple introduced its new scheduling system with DAS (Duet Activity Scheduler) and CTS-XPC (Centralized Task Scheduling), Time Machine backups were among the first to take advantage of it. Since then, instead of backups being made at exactly hourly intervals, they’re more flexible in timing, accommodating to environmental conditions such as thermal pressure and power state.
Howard Oakley:
One feature which appears to have been lost in the new Time Machine backups to APFS volumes is the ability to check the integrity of their contents, which now appears confined to backups made to HFS+ volumes.
Howard Oakley:
There’s a clear advantage to this new scheme in that it functions not just with whole files, but with changed blocks within files. Just as a snapshot references the data blocks which make up each file, so a snapshot-based backup can back up individual blocks which have changed, which can be significantly more efficient in the storage space required.
This new scheme not only retains hourly snapshots on the source volume, which are still kept for up to 24 hours, but provides its backups in the form of snapshots on the backup volume, where the file system data are stored in addition to the snapshot itself.
The final piece of magic used by Time Machine backups to APFS volumes is that its snapshots can be made not only for whole volumes, but for individual folders within a volume. If you want to back up just your Home Documents folder, Time Machine will do that, rather than having to back up your complete Data volume.
Howard Oakley:
Creating the backup begins in earnest with a local snapshot, which is termed the stable snapshot. This appears to be a whole-volume snapshot, which is then mounted at a path based on /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/[machine]/[datestamp]/[volume name]. The stable snapshot made in the last backup is located and mounted as the reference snapshot, at a similar path, but with a different datestamp, of course. TMA locates the “volume store”, into which the backed up files and other items will be copied. This should be at a path like /Volumes/[backup volname]/[datestamp].previous/.
[…]
TMA states the possible strategies which it could use to work out what is to be backed up[…]
[…]
Currently, with Big Sur only backing up Data and unroled general-purpose volumes, those are the four possibilities. The full list of what’s possible in Catalina includes:
- full first backups
- deep scans
- FSEvents
- snapshot diffing
- consistency scans
- cached events.
Howard Oakley:
Now that I’ve worked through the steps involved in an automatic Time Machine backup to APFS local storage (TMA), this article draws that out into a chart, and compares that against the processes used when backing up to HFS+ in Catalina (TMH).
Howard Oakley:
The backup store has a distinctive volume structure, consisting of hidden Spotlight indexes, any mounted backup snapshots listed by their datestamp, a property list containing details of all the backups in that store, and an optional property list giving information about any inheritance of those backups.
Backup snapshots themselves contain the eventdb constructed during their original backup process, a checkpoint file, a property list containing all the exclusions which applied to TMA backups when that backup was made, and the backup itself listed by volume name.
[…]
TMA backups provide good access to the user through the Time Machine app and the Finder. However, their ability to manipulate backups is severely limited. As these rely on snapshots, individual files can’t be removed from them, a feature restricted to TMH. Whole backups, complete with their snapshots, can be removed, though. That isn’t supported by the Time Machine app, but can be performed directly in the Finder.
Howard Oakley:
One day we’ll look back and remember fondly when it was possible to clone any Mac volume to an identical copy. Sadly, since the introduction of APFS in High Sierra, that has now stopped working for those volumes formatted using the new file system. Try making a clone of an APFS volume now and you may not even notice what’s missing from the copy: snapshots.
Howard Oakley:
Periodically, backup snapshots are indexed by Spotlight for the volume’s Spotlight-V100 indexes. This may require background mounting and unmounting of those snapshots, and often results in the spinning Time Machine icon being displayed against that volume in the Finder.
Howard Oakley:
Attention now needs to be devoted to addressing the problems identified here with changing source and destination volumes. It isn’t acceptable to have to start completely fresh backups whenever a disk needs to be changed, and Apple needs to document the processes required to inherit source and destination disks, without driving users to experiment with tmutil
.
For all its ingenuity and sophisticated engineering, of the three backup utilities which I use, Time Machine is by far the most complex, and the only one which makes changes like these so difficult.
Howard Oakley:
This confirms that TMA is as efficient as possible in both the copying and storage of APFS sparse files and clones. This is far superior to TMH, which would of course have had to copy across almost 15 GB extra data, and required a total of 15 GB space in the backups for these three files. With sparse files and clones being relatively common in APFS volumes, the efficiency of TMA can make a big difference to the time taken to make backups, and use of storage space on the backup volume.
Howard Oakley:
This article is a summary of the current benefits and limitations of TMA as its stands in macOS 11.2.3, at the end of which is a list of those detailed accounts. These should help you make a more informed decision as to whether to use TMA.
Howard Oakley:
One significant exclusion which has been added in Big Sur is the hidden and locked folder on each volume containing its local version database; this is to work around the bug which plagued TMH in Catalina when trying to back up large and complex version databases.
Howard Oakley:
This article looks at configuring and using TMA’s backup storage on a shared disk over a network – in this case, a shared APFS volume on another Mac running Big Sur.
Howard Oakley:
Being more complex and dependent on other systems, making Time Machine backups to shared storage on your network is more prone to fail. As I’ve spent much of the day sorting one such failure out, I thought it might be useful to discuss what went wrong and what went wronger.
Howard Oakley:
A quick check on one of my working folders, just a part of my extended Home folder, found almost 1600 clone files totalling over 10 GB in size. If I were still backing up to HFS+, every one of those files would have to be saved in full into my backup, and in every subsequent backup it would have to be present either in the form of a complete copy (if it had changed), a hard link, or one to a directory above it. Instead, my APFS backup just contains a directory entry for the clone.
Howard Oakley:
With Time Machine it’s so tempting just to let it back up your entire Data volume, and be done with it. This article explains how you can do better than that, and exclude items from that backup which would merely waste space.
Howard Oakley:
In just over a month’s time, Time Machine will turn fourteen, making it one of the longest-lasting and externally almost unchanged features in macOS. As I’ve been trawling back through my archives preparing a talk for MacSysAdmins about Time Machine, I though you might enjoy a stroll down memory lane, and return to autumn 2007 for a few moments.
Howard Oakley:
I have been honoured this year to be invited to present at MacSysAdmin Online 2021, talking about Time Machine.
You can watch my presentation and download my slides from here, where you’ll also find plenty of even better presentations.
Howard Oakley:
It’s that time of year when many of us are planning our upgrades, either to Big Sur or Monterey. One vital consideration is how to migrate our backups: this article looks at what you need to do for existing Time Machine backups, whether stored locally on an external disk, or on your network.
Howard Oakley:
If you’re going to use SMB as recommended by Apple, the most robust way seems to be disable AFP on all NAS which support SMB. It may sometimes help if you’re not connected to the NAS in the Finder, before you start setting that up as your TM backup destination.
Howard Oakley:
Earlier this month, I provided a presentation for the MacSysAdmins virtual conference. Now that’s done and dusted, I’m pleased to provide a copy of my slides in high quality PDF, together with my script, available from here: timemachinemacsysadmins
Howard Oakley:
If you’re intending to back up from Time Machine to network storage such as a NAS or another Mac, the above figures can be used to provide an estimate of how long those backups are likely to take. First, connect to a share on the server, and copy to it a single large file, such as the 10 GB test file used here. Measure the total time for that to transfer, and take two-thirds (0.67) of that transfer rate as the likely overall rate to be delivered by Time Machine. Then use that with your expected average hourly backup to calculate how long that is likely to take.
[…]
Time Machine settings you should consider for improving performance include:
- exclude items containing many small files, such as Xcode;
- back up very large files such as VMs separately;
- use default automatic hourly backups, rather than backing up less frequently;
- back up to APFS, which works at a block rather than file level, and backs up clones and sparse files much more efficiently.
[…]
If you should encounter poor performance when making backups, use T2M2’s Check Speed feature to identify which items are causing most slowing.
Howard Oakley:
After four years in which it had offered frustratingly limited support for the new features of APFS, Disk Utility is now complete: this version has excellent support for snapshots, no matter which app created them.
Howard Oakley:
However, we know that snapshots are strictly read-only, and the only user experiences that I can discover confirm my suspicion that all fsck_apfs
does when it finds an error in a snapshot is to throw its hands in the air, report an opaque error code, and not even attempt a repair.
For a backup snapshot, that’s fatal. All you can then do is delete the whole snapshot, knocking a hole in your backups which can never be replaced. Disk Utility’s typical response only rubs salt into the wound by telling the user to make a backup of the affected disk. As it’s currently impossible to copy backup snapshots to another disk, a single error on that storage compromises all your backups stored there: every single one of them, and there’s absolutely nothing that macOS offers to help that.
Howard Oakley:
Snapshots are one of the huge advances in APFS, but like other features, they can cause more problems than they’re worth. This article explains how they can go wrong, and what you can do to manage them so they don’t swallow all the free space on your storage.
[…]
Third-party backup products which incorporate snapshot features, like Carbon Copy Cloner (CCC), are more flexible and you can set custom snapshot retention policies for individual volumes. These operate independently, so CCC can’t change Time Machine’s policy, neither can Time Machine delete CCC’s snapshots automatically.
[…]
In most cases, apps should provide settings in their Preferences which let you store their temporary files on a volume which isn’t backed up, so avoiding them swelling the size of hourly snapshots.
Previously:
Update (2022-05-20): Howard Oakley:
Time Machine manages its backups actively to ensure that, whenever possible, they remain well within the disk space available to the backup volume. It does this by a process of ‘thinning’ older backups to recover the space that they occupy. If the backup volume is inside a container which completely fills that disk, then Time Machine will normally fill the volume, thus the container, thus the whole disk. Simply adding another non-backup volume to the same container will put the two volumes into competition for the same free disk space, and will eventually result in your use of the non-backup volume being determined by Time Machine’s thinning of its backups.
One way to avoid that competition from occurring is to reserve space on the backup disk for your non-backup storage. There are two ways to do that: you can set a reserve size on a volume in the same container as the backup volume, or you can put your non-backup volume into a separate container. Neither of those is mentioned in Apple’s guide.
[…]
However, you can only set reserve and quota sizes when you create the volume. Even diskutil
can’t change them once that volume has been created. The only way that I know to make such a change is to create a new volume with the desired sizes set, then move the contents of the original volume across to it.
Apple File System (APFS) Backup FSEvents History Mac Mac OS X Versions macOS 11.0 Big Sur macOS 12 Monterey Server Message Block (SMB) Time Machine
Apple (via Mark Gurman, MacRumors):
Currently, when an auto-renewable subscription price is increased, subscribers must opt in before the price increase is applied. The subscription doesn’t renew at the next billing period for subscribers who didn’t opt in to the new price. This has led to some services being unintentionally interrupted for users and they must take steps to resubscribe within the app, from Settings on iPhone and iPad, or in the App Store on Mac.
With this update, under certain specific conditions and with advance user notice, developers may also offer an auto-renewable subscription price increase, without the user needing to take action and without interrupting the service. The specific conditions for this feature are that the price increase doesn’t occur more than once per year, doesn’t exceed US$5 and 50% of the subscription price, or US$50 and 50% for an annual subscription price, and is permissible by local law. In these situations, Apple always notifies users of an increase in advance, including via email, push notification, and a message within the app.
Mitchell Clark:
Reading that literally, it means that both conditions would have to be true to require an opt-in. But the example scenario seems so ridiculous that it’s hard to believe that’s what Apple intends.
[…]
It’s worth noting that you could easily turn Apple’s logic on its head: if users were missing those renewal opt-in notices, wouldn’t they also miss these new price change warnings? But it does sound like they’ll be relatively in your face.
[…]
There is an easy fix to this: let users pick whether or not they want the auto-renewing price increases instead of deciding for them. In my mind, that’d just be a toggle in the App Store settings that says something like “Always ask for opt-in if price increases,” and turning it on would make it like this change never happened.
Previously:
Update (2022-05-19): Benjamin Mayo:
In the short term, those same competition forces mean that Apple will have to pull back on some of the customer-friendly In-App Purchase policies to align with the market, to keep publishers onboard.
[…]
The vast majority of subscriptions in the world do not work that way. In-App Purchase was a stark outlier. It stood in contrast to even Apple’s own subscriptions like iCloud or Apple One; they increase their price freely with notification, but without consent.
App Store App Subscriptions In-App Purchase iOS iOS 15
Riccardo Mori:
Listening to music with an iPod shuffle is still (and can still be) a fun experience. You can create the digital equivalent of a mixtape, load it on your shuffle, clip the shuffle to your shirt/jeans/jacket, and then you can go out and listen to music without even having to touch the device, unless you need to change volume or skip a track. It’s basically a hands-free device that disappears on you. If Apple made a new iPod shuffle with Bluetooth, the invisibility factor would be even higher, since you wouldn’t even have the earphones’ cable around you to remind you that you are wearing an iPod. It would still be a nice device for commuting, or jogging, or during a workout.
Sure, you might say that these uses are now taken over by the Apple Watch or other smartwatches, but for an Apple Watch you’ll pay a minimum of $199 up to more than $1,000. An iPod shuffle would be a $50 device. If you’re a casual user who just wants to have some music while out and about, jogging, etc., and don’t use a smartwatch, a little wearable device like the iPod shuffle could still be your cup of tea. But maybe wanting from today’s Apple a fun, inexpensive, wearable, colourful device is asking too much. Here, have an AirTag instead.
Tyler Hall:
With all the shit in the world in the last few years, listening to music has become even more of a refuge and safe space for me than it ever was before.
But, for me at least, the incredible technological convergence of every single use-case into a deck of cards-sized pocket super-computer means that when I do want to only listen to music - there are a million beeps, boops, and badges fighting for my attention.
An underappreciated feature of the iPod (because it wasn’t a feature you could market during its heyday) was that it was only an iPod. Not also a mobile phone and internet communicator.
He bought a Sony NW-A105 Walkman running Android.
For all the amazing interactions touch screens have given us, until I clicked to the next track without taking this Walkman out of my pocket, I had forgotten how nice it is to control my music by touch - and not by voice or by first waking my phone from sleep and tapping a button I can’t feel.
Previously:
Android Apple Watch Hardware iPod shuffle Music Sony
Benjamin Mayo:
Apple’s services tick the boxes, and they mostly do what they promise. However, nothing comes close to the quality of experience I expect to have from things branded with the Apple logo. When I am using these apps, I am not filled with confidence that striving for greatness was a top priority. Far too often, meeting revenue goals and business objectives seem more important to their creation.
They are built to a passing grade, but nothing more. Basic features found in services from rival companies are either lacking altogether in Apple’s apps, or implemented half-heartedly and performance is sluggish. Browsing in Music and TV is painful, with an over-reliance on the infinite scroll. New content is just tacked on the bottom of already long lists. Meanwhile, the navigation bars are blank when they could include simple shortcut buttons and filters to help users navigate and explore. Moreover, these apps feature too many loading states and too much waiting around. They are akin to janky web apps, rather than richly-compelling responsive experiences.
The services apps are all frustrating to use. In may ways, they feel worse than Web apps. I cannot believe how Apple has let them regress so much. I miss iTunes from 15 years ago. Looking through movies in the TV app the other day: there is no way to see a sorted list of titles. There’s no way to search my list of purchases, nor even to jump-scroll by letter. There is no way to mark a movie on my iPhone so that I can easily find it again on my Apple TV. I guess I could start playing it for a few seconds to make it appear in Up Next? But I don’t want to download it onto my phone, and the sideways scrolling Up Next list is hard to work with and also includes the things that I’m currently watching. Why does it scroll sideways? I guess so that the rest of the screen can be used to promote Apple TV+ content.
Previously:
Update (2022-05-13): Craig Grannell:
- Going into Albums view in Photos on iPhone and dragging up to prompt photos to actually upload
- Regularly force-quitting bird in Activity Monitor to get iCloud docs to sync
- Restarting Music to get streaming to play
Becky Hansmeyer:
There is downloaded, on-device video content in the TV app on my kids’ iPads that they literally cannot access without an internet connection. I have to tether their iPads to my phone in the car to get their library to appear. Otherwise it just shows an empty state.
Mike Rockwell:
I maintain an old Mac Mini that runs El Capitan and an even older iMac that runs Snow Leopard. iTunes is so much better on those older machines than the current state of the TV app, Apple Music, and Apple Podcasts.
My current pet peeve is the Podcast app’s lack of OPML export or import. What a terrible, user-hostile omission.
Update (2022-05-24): Nick Heer:
Apple’s native apps on these devices simply are not good enough, and that is bananas. The company’s whole thing is that it makes the entire widget, so hardware, software, and services can work seamlessly together. But they do not. They feel brittle, like I am using prototypes where any deviation from a golden path is a risky endeavour.
Apple Music Apple News Apple Podcasts Apple TV iOS iOS 15 Mac macOS 12 Monterey Music.app Photos.app Strategy Tax TV.app