Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: support disabling the built-in updater#219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 2 commits intomainfromethan/disable-updater-option
Aug 7, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedAug 7, 2025
edited
Loading

Closes#182.

UserDefaults can be forcibly set by MDM admins.
When thedisableUpdater bool in UserDefaults is set tofalse, the updater won't be initialized on launch, and the UI elements for the updater in settings will be hidden.

Related to#220.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ethanndicksonethanndicksonforce-pushed theethan/disable-updater-option branch from095bf83 tof34e415CompareAugust 7, 2025 02:03
@ethanndicksonethanndickson marked this pull request as ready for reviewAugust 7, 2025 02:15
Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR adds support for disabling the built-in updater via a UserDefaults setting that can be controlled by MDM policies. WhendisableUpdater is set to true, the updater won't initialize and related UI elements will be hidden.

  • Addsdisabled property to UpdaterService that checks UserDefaults for updater disable setting
  • Conditionally initializes the Sparkle updater only when not disabled
  • Updates GeneralTab UI to hide updater controls and show explanatory message when disabled
  • Refactors some@published properties to private(set) for better encapsulation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

FileDescription
UpdaterService.swiftCore logic for conditionally disabling updater initialization based on UserDefaults
GeneralTab.swiftUI changes to hide updater controls and show disabled message
FilePicker.swiftAccess control improvements for@published properties
VPNService.swiftAccess control improvements for@published properties

// The auto-updater can be entirely disabled by setting the
// `disableUpdater` UserDefaults key to `true`. This is designed for use in
// MDM configurations, where the value can be set to `true` permanently.
letdisabled:Bool=UserDefaults.standard.bool(forKey:Keys.disableUpdater)
Copy link
Preview

CopilotAIAug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The UserDefaults.bool(forKey:) method returns false when the key doesn't exist, which means the updater will be enabled by default. However, the comment suggests the intent is to disable the updater when the key is set to true. This logic appears inverted - consider using!UserDefaults.standard.bool(forKey: Keys.disableUpdater) if you want the updater enabled by default.

Copilot uses AI. Check for mistakes.

Button("Check for updates"){ updater.checkForUpdates()}.disabled(!updater.canCheckForUpdates)
}else{
Section{
Text("The app updater has been disabled by a device management policy.")
Copy link
Preview

CopilotAIAug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

[nitpick] The error message assumes the updater was disabled by device management policy, but the UserDefaults key could be set by other means. Consider making the message more generic like 'The app updater has been disabled.' or 'Automatic updates are not available.'

Suggested change
Text("The app updater has been disabled by a device management policy.")
Text("The app updater has been disabled.")

Copilot uses AI. Check for mistakes.

@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedAug 7, 2025
edited
Loading

Merge activity

  • Aug 7, 8:19 AM UTC: A user started a stack merge that includes this pull request viaGraphite.
  • Aug 7, 8:19 AM UTC:@ethanndickson merged this pull request withGraphite.

@ethanndicksonethanndickson merged commit830d147 intomainAug 7, 2025
4 checks passed
@ethanndicksonethanndickson deleted the ethan/disable-updater-option branchAugust 7, 2025 08:19
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@deansheatherdeansheatherdeansheather approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Support disabling the built-in updater
2 participants
@ethanndickson@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp