mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Release channel support (#239)
* Release channel support - Show SideStore in Browse if it's not from the current SideStore source - Change SideStore source URL and source ID based on if beta and nightly are in the version string - Use StoreApp name for InstalledApp name to allow for source-specified name to show up in My Apps * My Apps: Fix incorrect app name on first launch * News: fix duplicate news items from multiple SideStore release channel sources * Trusted Sources: Add stable and beta
This commit is contained in:
@@ -11,29 +11,37 @@ import UIKit
|
||||
|
||||
public extension Source
|
||||
{
|
||||
#if ALPHA
|
||||
static let altStoreIdentifier = Bundle.Info.appbundleIdentifier
|
||||
#else
|
||||
static let altStoreIdentifier = Bundle.Info.appbundleIdentifier
|
||||
#endif
|
||||
static var altStoreIdentifier: String {
|
||||
let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
|
||||
if appVersion != nil {
|
||||
if appVersion!.contains("beta") {
|
||||
return Bundle.Info.appbundleIdentifier + ".Beta"
|
||||
}
|
||||
if appVersion!.contains("nightly") {
|
||||
return Bundle.Info.appbundleIdentifier + ".Nightly"
|
||||
}
|
||||
}
|
||||
|
||||
return Bundle.Info.appbundleIdentifier
|
||||
}
|
||||
|
||||
#if STAGING
|
||||
static let altStoreSourceBaseURL = "https://sidestore-apps.naturecodevoid.dev/"
|
||||
|
||||
#if ALPHA
|
||||
static let altStoreSourceURL = URL(string: "https://apps.sidestore.io/")!
|
||||
#else
|
||||
static let altStoreSourceURL = URL(string: "https://apps.sidestore.io/")!
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if ALPHA
|
||||
static let altStoreSourceURL = URL(string: "https://apps.sidestore.io/")!
|
||||
#else
|
||||
static let altStoreSourceURL = URL(string: "https://apps.sidestore.io/")!
|
||||
#endif
|
||||
|
||||
#endif
|
||||
static var altStoreSourceURL: URL {
|
||||
let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
|
||||
if appVersion != nil {
|
||||
if appVersion!.contains("beta") {
|
||||
return URL(string: altStoreSourceBaseURL + "beta")!
|
||||
}
|
||||
if appVersion!.contains("nightly") {
|
||||
return URL(string: altStoreSourceBaseURL + "nightly")!
|
||||
}
|
||||
}
|
||||
|
||||
return URL(string: altStoreSourceBaseURL)!
|
||||
}
|
||||
}
|
||||
|
||||
public struct AppPermissionFeed: Codable {
|
||||
|
||||
Reference in New Issue
Block a user