mirror of
https://github.com/nicoverbruggen/NVAppUpdater.git
synced 2025-08-07 09:40:08 +02:00
Update instructions on how to set callback
This commit is contained in:
19
README.md
19
README.md
@ -70,8 +70,23 @@ await UpdateCheck(
|
||||
selfUpdaterName: "MyApp Self-Updater.app",
|
||||
selfUpdaterPath: "~/.config/com.example.my-app/updater",
|
||||
caskUrl: URL(string: "https://my-app.test/latest/build.rb")!,
|
||||
promptOnFailure: true
|
||||
).perform()
|
||||
).perform(promptOnFailure: true)
|
||||
```
|
||||
|
||||
You can also specify what callback needs to be used to determine the correct URL for the release notes. You may need to get some information from the CaskFile, which you are free to source. For example:
|
||||
|
||||
```swift
|
||||
import NVAppUpdater
|
||||
|
||||
await UpdateCheck(
|
||||
selfUpdaterName: "MyApp Self-Updater.app",
|
||||
selfUpdaterPath: "~/.config/com.example.my-app/updater",
|
||||
caskUrl: URL(string: "https://my-app.test/latest/build.rb")!,
|
||||
)
|
||||
.resolvingReleaseNotes(with: { caskFile in
|
||||
return URL(string: "https://my-app.com/release-notes/\(caskFile.version)")!
|
||||
})
|
||||
.perform(promptOnFailure: true)
|
||||
```
|
||||
|
||||
## Self-Updater
|
||||
|
Reference in New Issue
Block a user