[AltBackup+Schemes]: Fixes for URL schemes throughout both AltBackup and SideStore apps

This commit is contained in:
Magesh K
2024-12-14 05:51:11 +05:30
parent 976f4e1041
commit f542a52bda
10 changed files with 62 additions and 44 deletions

View File

@@ -11,7 +11,9 @@ import Foundation
public extension FileManager
{
var altstoreSharedDirectory: URL? {
guard let appGroup = Bundle.main.altstoreAppGroup else { return nil }
guard let appGroup = Bundle.main.altstoreAppGroup else {
return nil
}
let sharedDirectoryURL = self.containerURL(forSecurityApplicationGroupIdentifier: appGroup)
return sharedDirectoryURL

View File

@@ -343,14 +343,18 @@ public extension InstalledApp
public extension InstalledApp
{
// TODO: @mahee96: Do NOT hardcode app's url scheme prefixes as in here
// Need to get it dynamically from the Info.plist of other means
var openAppURL: URL {
let openAppURL = URL(string: "altstore-" + self.bundleIdentifier + "://")!
let openAppURL = URL(string: "sidestore-" + self.bundleIdentifier + "://")!
return openAppURL
}
// TODO: @mahee96: Do NOT hardcode app's url scheme prefixes as in here
// Need to get it dynamically from the Info.plist of other means
class func openAppURL(for app: AppProtocol) -> URL
{
let openAppURL = URL(string: "altstore-" + app.bundleIdentifier + "://")!
let openAppURL = URL(string: "sidestore-" + app.bundleIdentifier + "://")!
return openAppURL
}