From 2b3d41d9821b2f59a6692078ff13b6ee31313d3a Mon Sep 17 00:00:00 2001 From: Joseph Mattello Date: Tue, 7 Jun 2022 06:10:13 -0400 Subject: [PATCH] refactor sparkle URLs to info.plist Signed-off-by: Joseph Mattello --- AltServer/AppDelegate.swift | 6 ++++-- AltServer/Info.plist | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AltServer/AppDelegate.swift b/AltServer/AppDelegate.swift index cde13ae3..90ac42a1 100644 --- a/AltServer/AppDelegate.swift +++ b/AltServer/AppDelegate.swift @@ -66,11 +66,13 @@ class AppDelegate: NSObject, NSApplicationDelegate { ALTDeviceManager.shared.start() #if STAGING - SUUpdater.shared().feedURL = URL(string: "https://altstore.io/altserver/sparkle-macos-staging.xml") + let feedURL: String = Bundle.main.infoDictionary!["SUFeedURL"]! as! String #else - SUUpdater.shared().feedURL = URL(string: "https://altstore.io/altserver/sparkle-macos.xml") + let feedURL: String = Bundle.main.infoDictionary!["SUFeedURL"]! as! String #endif + SUUpdater.shared().feedURL = URL(string: feedURL) + let item = NSStatusBar.system.statusItem(withLength: -1) item.menu = self.appMenu item.button?.image = NSImage(named: "MenuBarIcon") diff --git a/AltServer/Info.plist b/AltServer/Info.plist index 096397d2..df713a6b 100644 --- a/AltServer/Info.plist +++ b/AltServer/Info.plist @@ -32,5 +32,7 @@ NSApplication SUFeedURL https://altstore.io/altserver/sparkle-macos.xml + SUFeedURL-Staging + https://altstore.io/altserver/sparkle-macos-staging.xml