Archive for February 16, 2023

Thursday, February 16, 2023

macOS 11.7.4

Juli Clover (full installer):

Today’s update addresses an ongoing issue with Safari icons. The Big Sur 11.7.3 update introduced a bug that prevented icons from showing up in the Safari Favorites section. Spaces where icons normally appear were blank, making it difficult to see which sites are in the Favorites section at a glance.

Alas, the blank icons bug in Ventura remains unfixed.


Update (2023-02-21): Jeff Johnson:

Safari 16.3.1 on Big Sur 11.7.4 fixed the missing extension icons, but it still hasn't fixed the missing pane in the extensions preferences.

Adding Contacts Without Entitlements

David Kopec:

For one-off contact additions, there’s a simpler way that requires none of that. The idea is basic: you create a contact, save it in vCard format, and then ask the operating system to open the vCard file in the Contacts app. When the Contacts app opens, it will ask the user if they really want to add the contact. This requires no entitlements (even if you’re using the note field), no authorization, and even works in a sandboxed app.


It works, but you might say, what about that note field? If you add a note property to your CNMutableContact you will notice it is silently dropped when the contact is added to the address book. This has nothing to do with the note special entitlement. It turns out CNContactVCardSerialization does not have support for either images or the note field. You can easily add both of these back. A Stack Overflow post provides some code showing how to do so.


When working on a new version of my macOS app Restaurants, I came across the note field entitlement requirement. I submitted a request to Apple using their online form to have access to the entitlement and a week later I was rejected for my request being too vague. Fair enough, it’s their sandbox, and they have the right to reject me for being too vague. But waiting so long to get an answer was frustrating and adding contacts requires a lot of ceremony.


Choosing and Switching Mastodon Instances

Jeff Johnson:

Does it matter which Mastodon instance you choose? I’ve seen many people claim that it doesn’t matter, and moreover that you can easily switch instances. I learned the hard way that this claim is unwarranted, a disservice to new Mastodon users. Your choice of instance is important, indeed crucial. Until yesterday I was on, a Mastodon instance with well over 4000 active users according to its server stats. Yesterday morning I woke to a “frozen” timeline. […] It turned out that my own experience was far from unique: looking at the federated timeline of, at a certain point all posts from other Mastodon instances stopped, leaving only posts from local users.


When you move from one Mastodon instance to another, you can export your follows, lists, account mutes, account blocks, domain blocks, and bookmarks from your old instance and import them on the new instance. But you can’t bring your posts with you! Your posts remain with your account on the old instance, which becomes inactive after you move, so you can no longer edit or delete those posts, though you can delete the account entirely. You also lose access to your direct messages: when your account becomes inactive, you can’t even read your old DMs anymore. You can request an archive of your data from your server, which I did before moving instances. However, this process has not yet completed.


Other parts of your account cannot be migrated via export and import. You need to manually recreate your profile, including avatar, header, bio, and metadata. You need to reset your preferences. You need to recreate your filters!

Jeff Johnson (Mastodon):

After 6 days of breakage, and 6 days of no word from the instance administrator, an automated email arrived yesterday from stating that my archive was ready for download. […] Moreover, later that day my followers finally transferred automatically to my new instance, a process that, again, was initiated 6 days prior.


According to the Mastodon Server Covenant, “All Mastodon servers we link to from our server picker commit to the following… At least one other person with emergency access to the server infrastructure”. Nonetheless, Join Mastodon is actually where I found back in December, when the covenant had the exact same language, and there’s no sign that or has an emergency backup admin, otherwise the outage wouldn’t have lasted for 6 days. Thus, it appears Mastodon doesn’t follow its own server covenant. Caveat emptor!


I remain on Mastodon now, despite the dismaying experience of the past week, not because I’m committed, not because Mastodon is great, but because the people I know happen to be on Mastodon. The same reason I was on Twitter. It’s too bad that both services turned out to be disasters.

Dr. Drang:

I switched Mastodon instances recently. I started on back in 2018 and moved to for a couple of reasons:

  1. I’d been hearing negative things (mainly from Anil Dash, who left a month or so ago) about the people who took over the instance. […]
  2. is using an older version of the server software which didn’t allow editing of posts. […]


Mastodon has a set of instructions for migrating servers, but I found this guide at Nerds Chalk to be more useful.


Update (2023-04-05): Jeff Johnson:

It looks like the Mastodon instance went down permanently a number of weeks ago with no notice.

Using Order Files to Speed Up Launches and Conformance Checks

Noah Martin:

A 150MB+ app binary file, like the one in Uber‘s app, takes between 500 ms and 1 second just to be loaded into memory (measured on an iPhone 6s). Loading large files like this is just a fraction of the app‘s launch time. To put in perspective, Apple‘s recommended startup time is just 400ms. That‘s already 1-2x the recommended completed launch time without any code even executing!

By default, apps can need to read more than 75% of their binary during startup. However, with the help of order files, we can read only the functions we need during start up.


The order file instructs the linker to put functions in a specific sequence. By ordering the binary so all the startup functions are together, we now only need to load those pages.

Noah Martin:

By default, protocol conformances end up spread throughout the __TEXT/__const section of the binary. This is because each module in an app generates their own static binary. When they are linked into the final app, the binaries are placed side by side. Data from different modules is not interleaved in the executable.


We can apply the idea of using order files to group data onto as few pages as possible to conformances, and generate an order file that moves all conformances onto their own pages.


In our tests, co-locating the conformances like this resulted in an over 20% decrease in protocol conformance lookup time on an iPhone 7 running iOS 15!

You can generate an order file that has this result by parsing the linkmap file.


Ejecting External Disks With macOS 13

Howard Oakley:

Among the rough edges in macOS is that infuriating message you may see when you try to eject or unmount a volume: it failed because the volume is in use.


In Disk Utility, the answer seems to be to try again, several times if necessary. It’s unusual for this not to work at all, although it may take a couple of attempts.


My personal favourite of them all is Sloth, from here. Although it’s not notarized, it does everything that I’d want in terms of matching lsof or fuser’s features. Most importantly, if you click its padlock at the lower right and authenticate, it will show all processes running as root.

This has been happening a lot for me since Catalina. Typically, I don’t get an error message at all—it just doesn’t eject.

The bigger problem is that sometimes Finder does show that it ejected, but then when I switch off the drive I get a warning saying that I ejected a drive that was still in use.

Aristotle Pagaltzis:

Ever since upgrading to a recent Mac that came with the disk formatted with AFPS, a perennial irritation has been Time Machine. I use a USB hard drive for backups, which of course needs unplugging when I want to take the machine with me somewhere. There are long stretches of time when I don’t even think about this because it works just fine. And then there are the other stretches of time when this has been impossible: clicking the eject button in Finder does nothing for a few ponderous moments and then shows a force eject dialog.


Unfortunately when this happens, there is no help for it: even closing all applications does not stop the mystery program from using it. So what is the program which is using the disk? The Spotlight indexer, it turns out.

There doesn’t seem to be a way to get Spotlight to stop, other than to kill the mds process and then try to unmount the drive before it respawns. I’m not keen on doing that, though, because I don’t want to corrupt the index file. It’s not that I want to be able to search my Time Machine backup—I wish I could disable indexing on that volume entirely—but that, with a damaged index file, indexing may keep running continuously.

Pierre Igot:

None of its volumes is currently mounted.

None of its files is currently open anywhere.

Yet somehow the disk is “in use” and cannot be safely ejected.

David Bureš:

I don’t know what it is with the recent releases of macOS and disks, but it’s been a complete disaster.

macOS would not unlock one of my encrypted drives. Just that single one. I even had to write a script to automatically unlock it when it got mounted, because it was juch a pain in the ass. And then one day, it fixed itself and never happened again.

Now, one of my drives just refuses to get mounted, which completely freezes the entire OS.

I have seen these behaviors, too.


Update (2023-02-21): Drew:

The culprit is always QuickLook for me.

If you run a lsof /Volumes/MY_DRIVE you should see a bunch of QuickLook processes.

Issuing a killall -KILL QuickLookUIService should allow it to immediately be ejected.

This just happened to me shortly after reading this post. The Quick Look process in question was for a file I had previewed about 12 hours earlier.