fix: update to use SPUStandardUpdaterController from sparkle v2 #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR is doing
Fixes #11 by adopting the recommended
SPUStandardUpdaterController
which creates the default UI and necessary delegates.Feed URL and decryption password settings migrated to
SPUUpdaterDelegate
as methodsfeedURLStringForUpdater
anddecryptionPasswordForUpdater
, so to eliminate warnings, I had to implement those.feedURLStringForUpdater
calls go function to provide results, which could add some extensibility, however, I haven't changed the library API just yet to expose this way of setting the feed URL.This PR should be backwards-compatible, but I was forced to export
CGOFeedURL
to use it in the ObjC code. Any suggestions on the naming will be appreciated to indicate, that this is an internal function and implementation detail.I also slightly tampered with the example to make sure the affected methods did not cause any crashes and still worked fine.
I also had to add a clearFeedURLFromUserDefaults call, during my tests with the previous
setFeedURL
version it persisted the URL and didn't get back to the one fromInfo.plist
. With this call that was fixed. So I suspect it's a necessary migration stepWhy this PR is important
Having those deprecation warnings is annoying, so I thought It would be nice to finally migrate to a modern second version of the Sparkle API and get familiar with the binding in case I would need more methods exposed in the future