Skip to content

Commit 83aa557

Browse files
committed
refactor sparkle URLs to info.plist
Signed-off-by: Joseph Mattello <[email protected]>
1 parent 7bdcd0d commit 83aa557

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

AltServer/AppDelegate.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
6666
ALTDeviceManager.shared.start()
6767

6868
#if STAGING
69-
SUUpdater.shared().feedURL = URL(string: "https://altstore.io/altserver/sparkle-macos-staging.xml")
69+
let feedURL: String = Bundle.main.infoDictionary!["SUFeedURL"]! as! String
7070
#else
71-
SUUpdater.shared().feedURL = URL(string: "https://altstore.io/altserver/sparkle-macos.xml")
71+
let feedURL: String = Bundle.main.infoDictionary!["SUFeedURL"]! as! String
7272
#endif
7373

74+
SUUpdater.shared().feedURL = URL(string: feedURL)
75+
7476
let item = NSStatusBar.system.statusItem(withLength: -1)
7577
item.menu = self.appMenu
7678
item.button?.image = NSImage(named: "MenuBarIcon")

AltServer/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@
3232
<string>NSApplication</string>
3333
<key>SUFeedURL</key>
3434
<string>https://altstore.io/altserver/sparkle-macos.xml</string>
35+
<key>SUFeedURL-Staging</key>
36+
<string>https://altstore.io/altserver/sparkle-macos-staging.xml</string>
3537
</dict>
3638
</plist>

0 commit comments

Comments
 (0)