feat(apple): Disable the update checker for MDM and App store - #9167
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| import UserNotifications | ||
| import Cocoa | ||
|
|
||
| @MainActor |
There was a problem hiding this comment.
Moved @MainActor to the class level
There was a problem hiding this comment.
Pull Request Overview
This PR enables disabling the built-in update checker for macOS clients installed via the App Store by wiring a new disableUpdateCheck config flag into the existing update flow and detecting App Store installs.
- Injects
StoreintoUpdateCheckerand listens for config changes to start/stop the timer. - Adds a new
disableUpdateCheckproperty inConfigurationwith its default and decoding logic. - Removes the App Store–specific branch in
downloadURL.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| UpdateNotification.swift | Injected Store, combined config and App Store detection to toggle update polling; added stopCheckingForUpdates. |
| MenuBar.swift | Passed store into UpdateChecker initializer. |
| Configuration.swift | Added disableUpdateCheck default, key, and parsing in config. |
Comments suppressed due to low confidence (2)
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift:146
- The App Store branch was removed, so
downloadURL()now always points to the website; consider restoring theif BundleHelper.isAppStore()case to direct users from App Store installs to the App Store page.
static func downloadURL() -> URL {
swift/apple/FirezoneKit/Sources/FirezoneKit/Views/UpdateNotification.swift:60
- There are no tests verifying that the update checker starts and stops correctly when
disableUpdateCheckor App Store mode changes; consider adding unit tests forhandleConfigurationChangebehavior.
private func handleConfigurationChange() {
|
|
||
| public static let defaultAccountSlug = "" | ||
| public static let defaultConnectOnStart = true | ||
| public static let defaultDisableUpdateCheck = false |
There was a problem hiding this comment.
The new disableUpdateCheck config option should be documented in the public README or API docs so users know how to opt out of the update checker.
There was a problem hiding this comment.
It seems to me that the comments generated by Copilot are getting progressivly worse.
|
Tested with disabling and enabling the update check. |
For App Store installed macOS clients, it doesn't make sense to run an update checker, because the system is managing the updates, and will notify the user if there's an update available for Firezone (the user has configured the system to manage app updates).
Related: #7664
Related: #4505