Hi, I am developing the browser based on Chromium, which initially relies on the nw_browser stack for discovering locally available network resources.
We have observed an issue where, after each software update—specifically, whenever additional files are written into the application bundle—a popup appears requesting the user to allow local network access, even if this permission was already granted.
The behavior is reproducible: simply overwriting files in the app bundle (we are using rsync as Chromium), even while the application is already running, causes the prompt to reappear. We have also noticed that Chromium itself exhibits the same behavior.
Also I found the mess in system settings, it has several Google Chrome for example: https://www.loom.com/share/da401f39ab134628807d77f1ca3185f5?from_recorder=1&focus_title=1
We would like to provide a smoother experience for our users and avoid confusing them with repeated permission prompts.
Could you please advise on possible approaches or best practices to improve our update mechanism in this regard?
I’d like to clarify your overall goal here. Are you planning to ship an app based on Chromium? Or are you building some sort of plug-in that you install within Chromium?
This matters because…
simply overwriting files in the app bundle
Right. That breaks the seal on the code signature, which causes problems for all privacy subsystems, which rely on the code signature to track the identity of your code, that is, to determine that version N+1 of your app is the ‘same code’ as version N. This is something we call out in TN3179 Understanding local network privacy:
To ensure that local network privacy reliably tracks the identity of your macOS program, sign it with an Apple-issued code-signing identity.
Most apps don’t suffer from this problem because, when Xcode rebuilds the app, it signs result. If you’ve selected an Apple-issued code-signing identity, the new app has the same designated requirement as the previous app, and thus the OS treats it as the same app, and so the new version inherits all the privileges acquired by the old version. We talk about this more in TN3127 Inside Code Signing: Requirements.
If you’re modifying the contents of your app bundle but not re-signing it, you will encounter weird problems.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"