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

Fix issues with standard updater controller initialization #1958

Merged
merged 4 commits into from
Sep 19, 2021

Conversation

zorgiepoo
Copy link
Member

@zorgiepoo zorgiepoo commented Sep 19, 2021

  • Fix updater SPUStandardUpdaterController delegate / user driver delegate not being set when hooked up via IBOutlets in Interface Builder - we need to defer initialization of updater until awakeFromNib, after the outlets are set
  • Disallow setting updater / user driver delegates programmatically after updater controller has been initialized by turning the outlets into instance variables

Related: #1957

Checklist:

  • My change is being tested and reviewed against the Sparkle 2.x branch. New changes must be developed on the 2.x development branch first.
  • My change is being backported to master branch (Sparkle 1.x). Please create a separate pull request for 1.x, should it be backported. Note 1.x is feature frozen and is only taking bug fixes, localization updates, and critical OS adoption enhancements.
  • I have reviewed and commented my code, particularly in hard-to-understand areas.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • My change is or requires a documentation or localization update

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 creating a SPUStandardUpdaterController programmatically (in Swift) and setting updater / user driver delegates in initializer - confirmed they fire.
  • Tested creating a SPUStandardUpdaterController in a nib (in Swift project) and setting updater / user driver delegate outlets in IB - confirmed delegate methods fire.
  • Tested when outlets are connected in a nib from an older version of Sparkle, they are still connected using this newer build of Sparkle.

macOS version tested: 11.5.2 (20G95)

Also log warnings when updater delegate or user driver delegate is set programmatically and the updater has already been initialized.
This should allow connecting outlets in IB while disallowing setting them programmatically.
@zorgiepoo zorgiepoo changed the title Improve / fix issues with standard updater controller initialization Fix issues with standard updater controller initialization Sep 19, 2021
@zorgiepoo zorgiepoo merged commit eba1734 into 2.x Sep 19, 2021
@zorgiepoo zorgiepoo deleted the fix-standard-updater-controller-init branch September 19, 2021 23:32
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.

1 participant