@@ -40,6 +40,10 @@ public final class UpdateChecker {
4040 public func checkForUpdates( ) {
4141 updater. checkForUpdates ( )
4242 }
43+
44+ public func resetUpdateCycle( ) {
45+ updater. resetUpdateCycleAfterShortDelay ( )
46+ }
4347
4448 public var automaticallyChecksForUpdates : Bool {
4549 get { updater. automaticallyChecksForUpdates }
@@ -60,18 +64,31 @@ class UpdaterDelegate: NSObject, SPUUpdaterDelegate {
6064 }
6165
6266 func updater( _ updater: SPUUpdater , mayPerform updateCheck: SPUUpdateCheck ) throws {
63- if !shouldAutomaticallyCheckForUpdate, updateCheck == . updatesInBackground {
64- throw CancellationError ( )
65- }
67+ // Not sure how it works
68+ // if !shouldAutomaticallyCheckForUpdate, updateCheck == .updatesInBackground {
69+ // throw CancellationError()
70+ // }
6671 }
67-
68- func updater( _ updater: SPUUpdater , shouldPostponeRelaunchForUpdate item: SUAppcastItem , untilInvokingBlock installHandler: @escaping ( ) -> Void ) -> Bool {
72+
73+ func updater(
74+ _ updater: SPUUpdater ,
75+ shouldPostponeRelaunchForUpdate item: SUAppcastItem ,
76+ untilInvokingBlock installHandler: @escaping ( ) -> Void
77+ ) -> Bool {
6978 if let updateCheckerDelegate {
7079 updateCheckerDelegate. prepareForRelaunch ( finish: installHandler)
7180 return true
7281 }
7382 return false
7483 }
84+
85+ func updater( _ updater: SPUUpdater , willScheduleUpdateCheckAfterDelay delay: TimeInterval ) {
86+ Logger . updateChecker. info ( " Will schedule update check after delay: \( delay) " )
87+ }
88+
89+ func updaterWillNotScheduleUpdateCheck( _ updater: SPUUpdater ) {
90+ Logger . updateChecker. info ( " Will not schedule update check " )
91+ }
7592
7693 func allowedChannels( for updater: SPUUpdater ) -> Set < String > {
7794 if UserDefaults . shared. value ( for: \. installBetaBuilds) {
0 commit comments