Archive for February 9, 2023

Thursday, February 9, 2023

Resetting TCC

Howard Oakley:

When privacy settings are playing up, and you get prompted to allow access that you have already agreed to, or access fails when it should have worked, there’s little you can do about it. Once you’ve fiddled with Privacy & Security settings without success, the only tool to try is tccutil.

If problems are confined to just one or two privacy categories, then you can reset just those using a command like sudo tccutil reset ListName only Apple doesn’t document the ListName to be used for each category. Experience suggests you could usefully try the following[…]

[…]

The nuclear option is to delete TCC’s database, a process requiring the use of Terminal in Recovery mode. This has been described in detail by Robin Kunde, and fleshed out further by Glenn Fleishman at MacWorld.

[…]

This all begs the question as to how the TCC database became corrupted in the first place. After all, it’s better to treat a cause rather than a symptom. As many users seem able to go for years without suffering problems so intractable as to require this nuclear option, and TCC databases are generally small in comparison with other vital system databases, it’s not easy to see how they can repeatedly become corrupted.

Indeed. I don’t recall this ever happening to me, but it’s not uncommon to hear about it from my customers, so it’s frustrating that a full reset is so obscure and difficult to do. Here are my instructions for troubleshooting TCC.

Previously:

Update (2023-02-13): Robin Kunde:

Another unfortunate vector for TCC corruption is device management software. At the dayjob we had a long running incident where most people couldn’t screenshare from Google Hangouts because it was impossible to grant the relevant permission to Chrome

Tanner Bennett:

TCC was easily corrupted on Catalina as a user with SIP disabled. I had to be careful to enable SIP before launching an app that would trigger a TCC prompt or the app wouldn’t show up in the list in System Prefs with no way to add it manually.

Howard Oakley:

The list of apps in Location Services isn’t determined by the user, all you can do is enable or disable apps that macOS recognises as wanting access to location information. Similarly for those listed in System Services, it’s on or off only. Not only that, but those settings aren’t handled by TCC or its databases, but by the locationd service. When you reset TCC, or remove its database, that leaves these settings unaffected. Neither does there appear to be any other way to alter these, even a command tool like tccutil.

[…]

If you intend to delete the whole database at /Library/Application Support/com.apple.TCC/TCC.db in Recovery mode, before doing so you should perform a full reset using sudo tccutil reset All and allow a couple of minutes for that to propagate to the user database, to ensure that has also been emptied.

[…]

Many of TCC’s settings and controls aren’t visible in Privacy & Security, as they determine access to iCloud services. Service names used by TCC for these include kTCCServiceLiverpool and kTCCServiceUbiquity, for CloudKit and iCloud Drive respectively.

Howard Oakley:

Even when you have the correct permissions, and SIP isn’t involved, read and write access to some locations can be blocked by the privacy controls in macOS, a subsystem for Transparency, Consent and Control, the dreaded TCC. While it manages access to services and features like camera and microphone, and controls over other apps, TCC also restricts disk, folder and file access. This is confusingly controlled by two interrelated categories in Privacy & Security settings, Full Disk Access and Files and Folders.

Those don’t govern access to iCloud, which, while also controlled by TCC, is in System Settings > Apple ID > iCloud Drive > Options.

Transmission 4.0

Transmission (Hacker News, Mac Rumors):

This is a major release, both in numbering and in effort! It’s been in active development for over a year and has a huge list of changes -- over a thousand commits -- since Transmission 3.00.

[…]

The code has been extensively profiled and improved to fix inefficient code and memory use. For example, a stress test of starting transmission-daemon with 25,000 torrents is almost entirely IO-bound, using 50% fewer CPU cycles and 70% fewer memory allocations than Transmission 3.00.

[…]

The entire codebase has been migrated from C to C++. In the process, we’ve removed thousands of lines of custom code and used standard C++ tools instead. The core’s code has shrunk by 18%. The core codebase has been extensively refactored to be more testable and maintainable.

Clascal in the Lisa Source Code

Chris Hanson:

While Lisa appears to have an underlying procedural API similar to that of the Macintosh Toolbox, the Office System applications were primarily written in the Clascal language—an object-oriented dialect of Pascal designed by Apple with Niklaus Wirth—using the Lisa Application ToolKit so they could share as much code as possible between all of them. This framework is the forerunner of most modern frameworks, including MacApp and the NeXT frameworks, which in turn were huge influences on the Java and .NET frameworks.

[…]

You define a class and its methods as an interface, and then its implementation doesn’t require repetition. This may sound convenient but in the end it means you don’t see the argument lists and return types at definition sites, so everyone wound up just copying & pasting them into comments next to the definition!

[…]

Just like Macintosh, Lisa has a Memory Manager whose heap is largely organized in terms of relocatable blocks referenced by handles rather than fixed blocks referenced by pointers. Thus normally in Pascal one would write SELF^^.h := h; to dereference the SELF handle and pointer when accessing the object. However, since Clascal knows SELF and myPoint and so on are objects, it just assumes the dereference—making it hard to get wrong. What I find interesting is that, unlike the Memory Manager on Macintosh, I’ve not seen any references to locking handles so they don’t move during operations. However, since there isn’t any saving and passing around of partially dereferenced handles most of the time, I suspect it isn’t actually necessary!

Chris Hanson (Mastodon):

Here’s another interesting thing I’ve learned about Clascal and Object Pascal: It went through exactly the same evolution from combining object allocation & initialization to separating them that Objective-C did a decade later!

Previously:

2022 Six Colors Apple Report Card

Jason Snell (Hacker News):

Coming off the high of the release of Apple Silicon, the Mac has slid back for two consecutive years. There was plenty of praise for the M2 MacBook Air, but the delay to the M2 Mac mini and MacBook Pro—which didn’t get announced until January, when our survey was in the field—definitely led to the Mac taking a hit. Panelists also expressed frustration with the lack of updates to the iMac, the lack of a Mac Pro, and issues with the Studio Display.

[…]

Like the Mac, iPhone scores also slid for the second straight year. (Given the smaller updates in the iPhone 13 and 14, that’s not surprising.) Despite expressing some boredom about the iPhone hardware, the panel largely had praise for iOS 16’s Lock Screen improvements and the Dynamic Island, and the iPhone 14 Pro’s always-on display was generally well received. The iPhone mini being discontinued was also a negative. This is tied for the lowest score Apple’s flagship product has ever received in this survey, but it’s still a strong score, all things considered.

[…]

The iPad took a precipitous fall to its lowest score in the history of this survey. There was some praise for the iPad 10th generation, but even that product got dinged for its confusing Apple Pencil story—and the fact that its new features make the rest of the product line feel antiquated. A treading-water update for the iPad Pro and the rough introduction of Stage Manager seem to be the biggest culprits in the bad mood of our panelists.

[…]

Things are good in wearables land. The Apple Watch Ultra refreshed that product line, and AirPods continue to impress as well.

Jason Snell:

First up is a chart that drills down into the vote distributions across all the categories, so you can see which categories gathered a variety of votes and which ones were a bit more consistent across all 55 voters.

Here are my responses:

Mac: 2 The highlight of the year has to be the Mac Studio, which seems like a success except for the multi-month shipping delays that extended into the fall. Otherwise it was a quiet year for hardware, except that the new MacBook Air gained a welcome 24 GB RAM ceiling. That’s OK since the rest of the hardware lineup is still solid. After many years of waiting, we finally got the Studio Display. As a display, it’s great, albeit pricey, however the camera is extremely disappointing, the audio and USB hub have been unreliable, and the lack of a power button causes a variety of problems. macOS continues to deteriorate in terms of reliability, and in general it seems like Apple has forgotten how to design Mac software. Many apps feel like iOS ports, and the services apps just don’t work very well. Aside from its own efforts, Apple continues to get in the way of third parties making good software. The Mac version of SwiftUI still doesn’t live up to Apple’s pitch.

iPhone: 4 iPhone hardware and iOS seem to be in decent shape. I usually upgrade my phone every two years, but I skipped this one because there was no new iPhone mini, and the regular iPhone 14 got a relatively minor update. The Dynamic Island is interesting. Lock Screen customization is welcome but awkward and limited. The camera seems to be slipping a bit vs. the competition, and photos sometimes look too processed and fake.

iPad: 3 As always, the software seems to be letting down the hardware. iPadOS continues to feel limited. Stage Manager seems half-baked, and its system requirements are too steep.

Wearables: 4, Apple Watch: 3 Apple Watch Ultra and the watch hardware in general seem to be doing well, except that CPU improvements continue to be minimal. The software has had some problems, with complications broken for me for much of the year, the Camera Remote timer delay too short to be usable, and unexplained giant battery drains. AirPods Pro’s noise cancellation has gotten worse with software updates, and I’m now having regular problems with static that never occurred before.

Apple TV: 2 Apple doesn’t seem to know what to do other than add a faster processor. The software seems to be designed around Apple’s business needs rather than what customers would want. The remote still needs work.

Services: 2 I continue to have reliability problems with iMessage and Siri. The apps that go along with the media services just aren’t very good. Apple Maps is still not as good as Google Maps in the areas where I go, but it does seem to be improving.

HomeKit/Home Automation: No vote I don’t use any of this stuff, and looking at the Home app doesn’t make me want to start.

Hardware Reliability: 4 My Mac hardware itself has been very reliable, but I count problems with iOS and audio on the Studio Display under hardware reliability. Hardware can regress through firmware updates; my AirPods Pro’s noise cancellation doesn’t work as well as it used to. My iPhone’s battery seems to be failing after a little more than 2 years, though iOS reports it at 88% health.

Software Quality: 1 Most things feel kind of buggy, and the Mac is in a particularly bad state, with a large number of small bugs (many persisting for years) and some debilitating larger ones. I’ve documented some of them here.

Developer Relations: 2 Pretty much everything to do with the App Store needs work, as does the documentation.

Social/Societal Impact: No vote [This is such a sprawling category that I never know how to boil it down to a number.]

See also:

Previously:

Update (2023-02-13): Nick Heer:

In 2022, I filed something like two bug reports every week solely against Apple’s own applications and operating systems.

[…]

Is all of that deserving of a lower score? Probably, but I have a hard time figuring out whether this is abnormally poor or merely worse than it ought to be. I seem to be living and working in a sea of bugs no matter whether I am using my Macs at home, the Windows PC at work, Adobe’s suite of products, or my thermostat.

It didn’t used to be like that.

John Gruber:

Resentment over App Store policies continues to build. Frustrations with the App Store review process seem unimproved. Apple’s goal should be for developer relations to be so good that developers want to create software exclusively for Apple’s platforms. The opposite is happening.

See also: TidBITS.