简体   繁体   中英

Calling Sparkle updater from outside the application

I'm writing a Ruby program to auto-update all apps that use the Sparkle framework. Building a list of all such apps is easy. The next step is to trigger the Sparkle updater.

The alternative would be to retrieve the bundle version and SUFeedURL from the app's Info.plist, then download and parse the developer's appcast XML file, and do the version comparison by hand, perhaps prompting the user to open and update the app if needed. This seems like an enormous waste of time and clock cycles, given that there's an excellent open-source framework that does it already.

Is it possible to call Sparkle's checkForUpdates method (or better yet, the checkForUpdatesInBackground method) from outside the app, using Ruby or bash?

Apps like AppFresh have accomplished this. Your best approach is probably looking through apps' Info.plist files' SUFeedURL keys. Then you can fetch the RSS feeds at those URLs and check for new versions and handle downloading them on your own.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM