refactor sparkle URLs to info.plist

Signed-off-by: Joseph Mattello <mail@joemattiello.com>
This commit is contained in:
Joseph Mattello
2022-06-07 06:10:13 -04:00
parent a56a48145b
commit 2b3d41d982
2 changed files with 6 additions and 2 deletions

View File

@@ -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")

View File

@@ -32,5 +32,7 @@
<string>NSApplication</string>
<key>SUFeedURL</key>
<string>https://altstore.io/altserver/sparkle-macos.xml</string>
<key>SUFeedURL-Staging</key>
<string>https://altstore.io/altserver/sparkle-macos-staging.xml</string>
</dict>
</plist>