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

Ask permission for automatically downloading and installing new updates #2285

Merged
merged 10 commits into from
Dec 3, 2022

Conversation

zorgiepoo
Copy link
Member

@zorgiepoo zorgiepoo commented Nov 27, 2022

In the update permission prompt, we add an option/checkbox to allow the user to opt into (or out of) automatically downloading and installing updates:

Screenshot 2022-11-27 at 5 31 36 AM

Screenshot 2022-11-27 at 5 32 22 AM

The default on or off state of automatically downloading and installing updates is based on the value the developer sets for SUAutomaticallyUpdate key in their Info.plist. If this is not specified, the default value is off.

After the user responds to the prompt, the updater sets its automaticallyDownloadsUpdates property based on the user's response. If the user doesn't want automatic updates checks, we assume the user doesn't want automatic downloading too.

If SUAllowsAutomaticUpdates is specified to NO then this option and checkbox is hidden in this prompt. In this case, we ignore the response to the user automatically downloading and installing updates.

As usual if the developer overrides and specifies SUEnableAutomaticChecks in their Info.plist, this permission prompt does not show up and we also don't record the user's response to this option.

I tried to update many of the localizations based on us already translating a similar key: "Automatically download and install updates in the future". However for this key I wanted to remove "in the future" bit.

I didn't localize and gave up on:

  • Chinese (main land)
  • Chinese (Taiwan)
  • Chinese (Hong Kong)
  • Hungarian
  • Japanese
  • Korean
  • Slovak
  • Thai

Fixes #2209

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 permission prompt with the test app in several different languages and tested that automaticallyDownloadsUpdates property on SPUUpdater is set (or not set) based on the user's response.

macOS version tested: 13.0.1 (22A400)

@zorgiepoo zorgiepoo added this to the 2.4 milestone Nov 27, 2022
@zorgiepoo zorgiepoo changed the title Ask permission for automatically downloading/installing new updates Ask permission for automatically downloading and installing new updates Nov 27, 2022
@Sparkle-Bot
Copy link
Contributor

In file included from /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionResponse.m:9: /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionResponse.h:51:72: warning: unknown command tag name [-Wdocumentation-unknown-command] If `automaticUpdateChecks` is `NO` then this property should not be `@YES`. ^~~~ 1 warning generated. In file included from /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionPrompt.m:13: /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionResponse.h:51:72: warning: unknown command tag name [-Wdocumentation-unknown-command] If `automaticUpdateChecks` is `NO` then this property should not be `@YES`. ^~~~ 1 warning generated. In file included from /Users/runner/work/Sparkle/Sparkle/Sparkle/SPUUpdater.m:14: /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionResponse.h:51:72: warning: unknown command tag name [-Wdocumentation-unknown-command] If `automaticUpdateChecks` is `NO` then this property should not be `@YES`. ^~~~ 1 warning generated. In file included from /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionResponse.m:9: /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionResponse.h:51:72: warning: unknown command tag name [-Wdocumentation-unknown-command] If `automaticUpdateChecks` is `NO` then this property should not be `@YES`. ^~~~ 1 warning generated. In file included from /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionPrompt.m:13: /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionResponse.h:51:72: warning: unknown command tag name [-Wdocumentation-unknown-command] If `automaticUpdateChecks` is `NO` then this property should not be `@YES`. ^~~~ 1 warning generated. In file included from /Users/runner/work/Sparkle/Sparkle/Sparkle/SPUUpdater.m:14: /Users/runner/work/Sparkle/Sparkle/Sparkle/SUUpdatePermissionResponse.h:51:72: warning: unknown command tag name [-Wdocumentation-unknown-command] If `automaticUpdateChecks` is `NO` then this property should not be `@YES`. ^~~~ 1 warning generated. note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order

@zorgiepoo
Copy link
Member Author

I didn't localize and gave up on:

  • Chinese (main land)
  • Chinese (Taiwan)
  • Chinese (Hong Kong)
  • Hungarian
  • Japanese
  • Korean
  • Slovak
  • Thai

cc @Eitot @ososoio @ChiahongHong @kasimok @horcs @1024jp @chotiwat based on people that have added or updated relevant translations in the past and want to provide input on how Automatically download and install updates should be translated to one of the languages mentioned above.

@ChiahongHong
Copy link
Contributor

Hello, @zorgiepoo

For "Automatically download and install updates", here are the corresponding Chinese localizations:

Thanks.

@chotiwat
Copy link

Thanks for asking. Automatically download and install updates in Thai should be ดาวน์โหลดและติดตั้งอัพเดทโดยอัตโนมัติ.

@zorgiepoo zorgiepoo merged commit bdc095b into 2.x Dec 3, 2022
@zorgiepoo zorgiepoo deleted the automatic-download-permission branch December 3, 2022 06:29
@zorgiepoo
Copy link
Member Author

Thanks all.

danielpunkass added a commit to danielpunkass/Sparkle that referenced this pull request Feb 27, 2023
…s on my branch.

* commit '362f50a8a19cfb1a18202c5912ce4ce6f94d0190': (60 commits)
  Exit with an error if generate_appcast cannot sign an update (sparkle-project#2322)
  Update SUVersionDisplay to allow including build versions and update information (sparkle-project#2321)
  Update Package management files for version 2.3.2
  Update CHANGELOG for 2.3.2
  Remove unnecessary min macro checks (sparkle-project#2318)
  Add support for plain text release notes view (sparkle-project#2315)
  Don't construct appcast item if enclosure URL is invalid (sparkle-project#2317)
  Finnish localization grammar fixes (sparkle-project#2311)
  Reduce code size and make codebase more consistent (sparkle-project#2305)
  Add delegate method to hide showing version history option (sparkle-project#2303)
  Update Package management files for version 2.3.1
  Update CHANGELOG for 2.3.1
  Add deprecations/warnings for incorrect feed & update checking usage (sparkle-project#2295)
  Log the URL that failed to download correctly (sparkle-project#2296)
  Remove duplicate Sparkle localization strings in Updater app (sparkle-project#2288)
  Ask permission for automatically downloading and installing new updates (sparkle-project#2285)
  Upgrade CI to default to using Xcode 14.1 (sparkle-project#2287)
  Enable deployment post processing for Release configurations (sparkle-project#2286)
  Fix update permission alert title text overlapping with question text (sparkle-project#2284)
  Update Czech translation (sparkle-project#2275)
  ...
1024jp added a commit to 1024jp/Sparkle that referenced this pull request Dec 2, 2023
@1024jp 1024jp mentioned this pull request Dec 2, 2023
6 tasks
zorgiepoo pushed a commit that referenced this pull request Dec 2, 2023
zorgiepoo pushed a commit that referenced this pull request Dec 20, 2023
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.

Add option to automatically download/install new updates in permission prompt
4 participants