https://github.com/rodydavis/auto_updater
Flutter Auto Updater for MacOS/Windows with Sparkle
https://github.com/rodydavis/auto_updater
cicd flutter linux macos sparkle-upgrade-tool windows
Last synced: about 2 months ago
JSON representation
Flutter Auto Updater for MacOS/Windows with Sparkle
- Host: GitHub
- URL: https://github.com/rodydavis/auto_updater
- Owner: rodydavis
- License: mit
- Created: 2020-01-21T23:27:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-22T02:02:43.000Z (over 5 years ago)
- Last Synced: 2025-03-23T22:40:40.599Z (2 months ago)
- Topics: cicd, flutter, linux, macos, sparkle-upgrade-tool, windows
- Language: Ruby
- Size: 1.19 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# auto_updater
An auto updating example built for Flutter Desktop that uses Sparkle.

### MacOS
- Source: https://github.com/sparkle-project/Sparkle
- Info: https://sparkle-project.org## Getting Started
You can easily just download the project and replace the feed url if you wish! Or fork the project template.
### MacOS Setup
More info here: https://sparkle-project.org/documentation/
Add Sparkle to your MacOS `macos/Podfile`
```ruby
target 'Runner' do
use_frameworks!
use_modular_headers!
# Extra Pods
pod 'Sparkle' # <-- Add This Line
```Open `macos/Runner/info.plist` and add the following keys:
```xml
SUFeedURL
YOUR_FEED_URL
SUEnableAutomaticChecks```
Replace `YOUR_FEED_URL` with your [AppCast](https://github.com/vslavik/winsparkle/wiki/Appcast-Feeds) url. You can test by using [this demo feed](https://sparkle-project.org/files/sparkletestcast.xml).
Open `macos/Runner/MainFlutterWindow.swift` and modify it to look like this:
```swift
import Cocoa
import FlutterMacOSimport Sparkle
class MainFlutterWindow: NSWindow {
@IBAction func checkForUpdates(_ sender: Any) {
let updater = SUUpdater.shared()
updater?.feedURL = URL(string: "YOUR_FEED_URL")
updater?.checkForUpdates(self)
}override func awakeFromNib() {
let flutterViewController = FlutterViewController.init()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)RegisterGeneratedPlugins(registry: flutterViewController)
super.awakeFromNib()
}
}```
Open the application worspace `macos/Runner.xcworkspace`.
Add a menu item:

Add a new opbject:

Change the class:

Connect the action by holding shift:
