Fixing stuck macOS Local Network permissions
TL;DR
macOS permissions can become stuck in a state where the UI shows them turned on, but the system behaves as though they are turned off. The workaround is to reset the permission with tccutil
, then find and delete every copy of the app with the same Bundle ID, and maybe restart.
The Scene
Apple added a yet another new permission prompt in macOS 15 Sequoia; they brought Local Network permission over from iOS. Now when an app needs to access another device (like a server) on the same local network (over Ethernet or Wi-Fi), the system will throw up a permission dialog on first access, then fail local network access until the user gives the app permission.
That's all well-and-good; until it's not. Shortly after the first beta release of Sequoia, I was working on one of my personal apps that accesses a service on a local server. At this point I'd already given the app Local Network permission, and things had been working smoothly.
The Problem
As part of the changes I was making to the app, I was renaming it from All-the-Things to Omni. Suddenly Omni was unable to access my server, as though I'd denied Local Network access. Checking System Settings > Privacy & Security > Local Network showed Omni in there, under the new name, and with access turned on. There may even have been two entries in there (it was 6 months ago, after all).
Michael and I ended up spending half the day trying to get the Local Network permission dialog to appear. It seems that once you’ve approved access for a given Bundle ID, if you change something about the built app, such as the target name, you will be silently denied Local Network access.
The Workaround
In the end, the workaround is to:
- Use
tccutil
to remove all permissions for your app's bundle id.tccutil reset All your.bundle.id
- Then, remove all copies of the app that the system can see. Don't forget to find all the builds of your app that are inside your Developer folder. I'm not sure if you need to remove builds that are inside your Xcode Archives (
.xcarchive
). Also, you probably need to empty the Trash.find /Applications -name 'YourApp.app' -type d find ~ -name 'YourApp.app' -type d
If you’re lucky, the app will be gone from the System Settings page. If it’s not gone, just missing its icon, a reboot might fix that. Once it’s gone from Settings, the next launch of the app (after re-building it) should show the permission dialog again.
Open Questions
- Exactly how extensively to you need to remove copies of your app? Maybe the system is only looking in a couple of these places. For example is it looking in the
.xcarchive
folders? - Is this bug limited to just the Local Network permission, or does it affect all the TCC-controlled permissions?
Epilogue
A couple of days ago Michael called me, asking me what the steps were to get out of this situation. The app he's writing had suddenly fallen into the same state. I dug up my old notes, read them out to him, then he used find
to locate and delete all copies of his app. After a restart, the permission dialog appeared again. At that point we decided I should write this up for other people to find.
Also, I just looked at my Local Network permissions page, and saw the same problem waiting to bite me 😳: