1
1
# auto_updater
2
2
3
- [ ![ pub version] [ pub-image ]] [ pub-url ] [ ![ ] [ discord-image ]] [ discord-url ] ![ ] [ visits-count-image ]
3
+ [ ![ pub version] [ pub-image ]] [ pub-url ] [ ![ ] [ discord-image ]] [ discord-url ]
4
4
5
5
[ pub-image ] : https://img.shields.io/pub/v/auto_updater.svg
6
6
[ pub-url ] : https://pub.dev/packages/auto_updater
7
-
8
7
[ discord-image ] : https://img.shields.io/discord/884679008049037342.svg
9
8
[ discord-url ] : https://discord.gg/zPa6EZ2jqb
10
9
11
- [ visits-count-image ] : https://img.shields.io/badge/dynamic/json?label=Visits%20Count&query=value&url=https://api.countapi.xyz/hit/leanflutter.auto_updater/visits
12
-
13
10
This plugin allows Flutter ** desktop** apps to automatically update themselves (based on [ sparkle] ( https://sparkle-project.org/ ) and [ winsparkle] ( https://winsparkle.com ) ).
14
11
15
12
<img src =" screenshots/sparkle.png " width =" 732 " alt =" " >
@@ -23,39 +20,41 @@ English | [简体中文](./README-ZH.md)
23
20
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
24
21
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
25
22
26
- - [ auto_updater] ( #auto_updater )
27
- - [ Platform Support] ( #platform-support )
28
- - [ Quick Start] ( #quick-start )
29
- - [ Installation] ( #installation )
30
- - [ ⚠️ Windows requirements] ( #️-windows-requirements )
31
- - [ Usage] ( #usage )
32
- - [ Publish your app] ( #publish-your-app )
33
- - [ Generate private key] ( #generate-private-key )
34
- - [ macOS] ( #macos )
35
- - [ Windows] ( #windows )
36
- - [ Packaging] ( #packaging )
37
- - [ macOS] ( #macos-1 )
38
- - [ Windows] ( #windows-1 )
39
- - [ Get signature] ( #get-signature )
40
- - [ macOS] ( #macos-2 )
41
- - [ Windows] ( #windows-2 )
42
- - [ Distributing] ( #distributing )
43
- - [ Who's using it?] ( #whos-using-it )
44
- - [ API] ( #api )
45
- - [ AutoUpdater] ( #autoupdater )
46
- - [ Methods] ( #methods )
47
- - [ setFeedURL] ( #setfeedurl )
48
- - [ checkForUpdates] ( #checkforupdates )
49
- - [ Related Links] ( #related-links )
50
- - [ License] ( #license )
23
+ - [ Platform Support] ( #platform-support )
24
+ - [ Quick Start] ( #quick-start )
25
+ - [ Installation] ( #installation )
26
+ - [ ⚠️ Windows requirements] ( #-windows-requirements )
27
+ - [ Usage] ( #usage )
28
+ - [ Publish your app] ( #publish-your-app )
29
+ - [ Generate private key] ( #generate-private-key )
30
+ - [ macOS] ( #macos )
31
+ - [ Windows] ( #windows )
32
+ - [ Packaging] ( #packaging )
33
+ - [ macOS] ( #macos-1 )
34
+ - [ Windows] ( #windows-1 )
35
+ - [ Get signature] ( #get-signature )
36
+ - [ macOS] ( #macos-2 )
37
+ - [ Windows] ( #windows-2 )
38
+ - [ Distributing] ( #distributing )
39
+ - [ Troubleshooting] ( #troubleshooting )
40
+ - [ macOS] ( #macos-3 )
41
+ - [ Who's using it?] ( #whos-using-it )
42
+ - [ API] ( #api )
43
+ - [ AutoUpdater] ( #autoupdater )
44
+ - [ Methods] ( #methods )
45
+ - [ setFeedURL] ( #setfeedurl )
46
+ - [ checkForUpdates] ( #checkforupdates )
47
+ - [ setScheduledCheckInterval] ( #setscheduledcheckinterval )
48
+ - [ Related Links] ( #related-links )
49
+ - [ License] ( #license )
51
50
52
51
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
53
52
54
53
## Platform Support
55
54
56
55
| Linux | macOS | Windows |
57
56
| :---: | :---: | :-----: |
58
- | ➖ | ✔️ | ✔️ |
57
+ | ➖ | ✔️ | ✔️ |
59
58
60
59
## Quick Start
61
60
@@ -117,7 +116,7 @@ void main() async {
117
116
Run the following command:
118
117
119
118
``` bash
120
- flutter pub run auto_updater:generate_keys
119
+ dart run auto_updater:generate_keys
121
120
```
122
121
123
122
> You need to run this command on ` macOS ` and ` Windows ` systems separately.
@@ -235,7 +234,7 @@ flutter_distributor release --name dev --jobs release-windows
235
234
Run the following command:
236
235
237
236
```
238
- flutter pub run auto_updater:sign_update dist/1.1.0+2/auto_updater_example-1.1.0+2-macos.zip
237
+ dart run auto_updater:sign_update dist/1.1.0+2/auto_updater_example-1.1.0+2-macos.zip
239
238
```
240
239
241
240
Output:
@@ -251,15 +250,14 @@ Update the obtained new signature to the value of the `sparkle:edSignature` attr
251
250
Run the following command:
252
251
253
252
```
254
- flutter pub run auto_updater:sign_update dist/1.1.0+2/auto_updater_example-1.1.0+2-windows-setup.exe
253
+ dart run auto_updater:sign_update dist/1.1.0+2/auto_updater_example-1.1.0+2-windows-setup.exe
255
254
```
256
255
257
256
Output:
258
257
259
258
```
260
259
261
- MEUCIQCVbVzVID7H3aUzAY5znpi+ySZKznkukV8whlMFzKh66AIgREUGOmvavlcg
262
- 6hwAwkb2o4IqVE/D56ipIBshIqCH8rk=
260
+ sparkle:dsaSignature="MEUCIQCVbVzVID7H3aUzAY5znpi+ySZKznkukV8whlMFzKh66AIgREUGOmvavlcg6hwAwkb2o4IqVE/D56ipIBshIqCH8rk=" length="13400992"
263
261
```
264
262
265
263
Update the obtained new signature to the value of the ` sparkle:dsaSignature ` attribute of the ` enclosure ` node of the ` appcast.xml ` file.
@@ -296,7 +294,7 @@ Add `appcast.xml` to your project `dist/` directory.
296
294
<pubDate >Sun, 16 Feb 2022 12:00:00 +0800</pubDate >
297
295
<enclosure url =" 1.1.0+2/auto_updater_example-1.1.0+2-windows.exe"
298
296
sparkle : dsaSignature =" MEUCIQCVbVzVID7H3aUzAY5znpi+ySZKznkukV8whlMFzKh66AIgREUGOmvavlcg6hwAwkb2o4IqVE/D56ipIBshIqCH8rk="
299
- sparkle : version =" 1.1.0"
297
+ sparkle : version =" 1.1.0+2 "
300
298
sparkle : os =" windows"
301
299
length =" 0"
302
300
type =" application/octet-stream" />
@@ -313,12 +311,14 @@ Start the test update server:
313
311
cd dist/
314
312
serve -l 5002
315
313
```
314
+
316
315
## Troubleshooting
317
316
318
317
### macOS
319
318
320
319
- Make sure you have the sparkle pod added as described in [ Sparkle Documentation] ( https://sparkle-project.org/documentation/ )
321
320
- Make sure you have added and enabled network capabilties of your app and disabled the sandbox for release by adding the following to your entitlement files for debug and release
321
+
322
322
```
323
323
<key>com.apple.security.network.client</key>
324
324
<true/>
@@ -335,6 +335,7 @@ serve -l 5002
335
335
## API
336
336
337
337
<!-- README_DOC_GEN -->
338
+
338
339
### AutoUpdater
339
340
340
341
#### Methods
@@ -351,7 +352,6 @@ Asks the server whether there is an update. You must call setFeedURL before usin
351
352
352
353
Sets the auto update check interval, default 86400, minimum 3600, 0 to disable update
353
354
354
-
355
355
<!-- README_DOC_GEN -->
356
356
357
357
## Related Links
0 commit comments