How to perform update check on application startup and wait for user to respond #2699
Replies: 3 comments 1 reply
-
OK, I found it - use the updater to programatically control the checking. |
Beta Was this translation helpful? Give feedback.
-
Note this can lead to a bad user experience. Performing a background check via checkForUpdatesInBackground could have some latency, so if you treat it in a synchronous way you may add latency to your app launch experience. Also as the documentation states for that method, by default Sparkle may not deliver the update alert immediately if a significant amount of time elapses after starting the updater. There's also automatic downloading of updates via SUAutomaticallyUpdate to consider. |
Beta Was this translation helpful? Give feedback.
-
Not sure what you mean - as there is this in the documentation. After starting the updater and before the next runloop cycle, one of -checkForUpdates, -checkForUpdatesInBackground, or -checkForUpdateInformation can be invoked. This may be useful if you want to check for updates immediately or without showing a potential permission prompt. So far this seems to do the check instantly. I am not using any automatic Sparkle options and have my own Timer in the app to trigger the background checks once the app has started up - so for these it doesn't matter if there is a delay before getting a response - but I don't see any delay. As for bad user experience - it doesn't get any worse than when using the Standard Sparkle controller. What is the relevance of SUAutomaticallyUpdate ? |
Beta Was this translation helpful? Give feedback.
-
I need to check for software updates immediately on starting the application and need to prevent the application from performing other startup activities until the user has responded if there were any updates.
It's not clear whether there is a way to programatically control the checking via APIs.
PSUEDO CODE
Thanks
Beta Was this translation helpful? Give feedback.
All reactions