diff --git a/Xcodes/Resources/Info.plist b/Xcodes/Resources/Info.plist
index 0a907aa..f39533c 100644
--- a/Xcodes/Resources/Info.plist
+++ b/Xcodes/Resources/Info.plist
@@ -37,5 +37,7 @@
com.robotsandpencils.XcodesApp.Helper
identifier "com.robotsandpencils.XcodesApp.Helper" and info [CFBundleShortVersionString] >= "1.0.0" and anchor apple generic and certificate leaf[subject.OU] = "$(CODE_SIGNING_SUBJECT_ORGANIZATIONAL_UNIT)"
+ SUFeedURL
+ https://robotsandpencils.github.io/XcodesApp/appcast.xml
diff --git a/Xcodes/XcodesApp.swift b/Xcodes/XcodesApp.swift
index 4fb73bc..2ef0d76 100644
--- a/Xcodes/XcodesApp.swift
+++ b/Xcodes/XcodesApp.swift
@@ -1,5 +1,6 @@
-import SwiftUI
import AppKit
+import Sparkle
+import SwiftUI
@main
struct XcodesApp: App {
@@ -28,6 +29,11 @@ struct XcodesApp: App {
appDelegate.showAboutWindow()
}
}
+ CommandGroup(after: .appInfo) {
+ Button("Check for Updates...") {
+ appDelegate.checkForUpdates()
+ }
+ }
CommandGroup(after: CommandGroupPlacement.newItem) {
Button("Refresh") {
appState.update()
@@ -83,4 +89,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
acknowledgementsWindow.center()
acknowledgementsWindow.makeKeyAndOrderFront(nil)
}
+
+ func checkForUpdates() {
+ SUUpdater.shared()?.checkForUpdates(self)
+ }
+
+ func applicationDidFinishLaunching(_ notification: Notification) {
+ // Initialize manually
+ SUUpdater.shared()
+ }
}