Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add standard user driver APIs for gentle scheduled update reminders #2122

Merged
merged 27 commits into from
Jun 4, 2022

Conversation

zorgiepoo
Copy link
Member

@zorgiepoo zorgiepoo commented May 8, 2022

This allows developers to provide gentle reminders when scheduled update alerts would normally appear.

This is work a part of #924.

Documentation page written in sparkle-project/sparkle-project.github.io#138

Backgrounded apps no longer steal focus from other active applications when scheduled update alerts show up (unless the app just launched by the user). The update alert window is also not floating above all other app's windows anymore too. A logging message is done for backgrounded apps that schedule update checks but do not implement gentle reminder support.

The progress window (showing downloading, installing) frame position is also now in center to where the update alert window was last placed before being closed, and does not steal focus if the update alert wasn't key.

Foreground apps now wait until the app becomes re-activated before presenting a new update when opting into Sparkle handling showing the update.

APIs are now provided to allow developers to override Sparkle handling of showing updates, or add and dismiss gentle reminders both for foreground and background running applications.

Misc Checklist:

  • My change requires a documentation update on Sparkle's website repository
  • My change requires changes to generate_appcast, generate_keys, or sign_update

Only bug fixes to regressions or security fixes are being backported to the 1.x (master) branch now. If you believe your change is significant enough to backport, please also create a separate pull request against the master branch.

Testing

I tested and verified my change by using one or multiple of these methods:

  • Sparkle Test App
  • Unit Tests
  • My own app
  • Other (please specify)

Tested the samples in the documentation PR, while the app is a regular one and a background running one, app scheduled a check near launch and 10 seconds later, while the app was in-active and active (currently frontmost), and while the system has been idle vs has been in active use for non-background running app.

macOS version tested: 12.3 (21E230)

@zorgiepoo zorgiepoo added this to the 2.2 milestone May 8, 2022
@Sparkle-Bot
Copy link
Contributor

/Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdateAlert.m:91:5: warning: completion handler is never used when taking false branch [-Wcompletion-handler] if (self != nil) { ^ 1 warning generated. /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdateAlert.m:91:5: warning: completion handler is never used when taking false branch [-Wcompletion-handler] if (self != nil) { ^ 1 warning generated. note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order

zorgiepoo added 6 commits May 14, 2022 10:46
If the user moves the update alert window to somewhere off-center in the screen, we should show the status window (for downloading, extraction, installing progress) in the center where the update alert window was.
@zorgiepoo zorgiepoo merged commit 58fa11c into 2.x Jun 4, 2022
@zorgiepoo zorgiepoo deleted the gentle-reminders branch June 4, 2022 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants