closes #93 redo of bundle id’s from .app

Signed-off-by: Joseph Mattello <mail@joemattiello.com>
This commit is contained in:
Joseph Mattello
2022-12-30 16:51:36 -05:00
committed by Joe Mattiello
parent 989e8c3aa6
commit d797ddd668
9 changed files with 19 additions and 17 deletions

View File

@@ -77,7 +77,7 @@ extension XPCConnectionHandler: NSXPCListenerDelegate
guard guard
let codeSigningInfo = signingInfo as? [String: Any], let codeSigningInfo = signingInfo as? [String: Any],
let bundleIdentifier = codeSigningInfo["identifier"] as? String, let bundleIdentifier = codeSigningInfo["identifier"] as? String,
bundleIdentifier.contains("com.rileytestut.AltStore") bundleIdentifier.contains(Bundle.Info.appbundleIdentifier)
else { return false } else { return false }
let connection = XPCConnection(newConnection) let connection = XPCConnection(newConnection)

View File

@@ -18,12 +18,12 @@ import EmotionalDamage
extension AppDelegate extension AppDelegate
{ {
static let openPatreonSettingsDeepLinkNotification = Notification.Name("com.rileytestut.AltStore.OpenPatreonSettingsDeepLinkNotification") static let openPatreonSettingsDeepLinkNotification = Notification.Name(Bundle.Info.appbundleIdentifier + ".OpenPatreonSettingsDeepLinkNotification")
static let importAppDeepLinkNotification = Notification.Name("com.rileytestut.AltStore.ImportAppDeepLinkNotification") static let importAppDeepLinkNotification = Notification.Name(Bundle.Info.appbundleIdentifier + ".ImportAppDeepLinkNotification")
static let addSourceDeepLinkNotification = Notification.Name("com.rileytestut.AltStore.AddSourceDeepLinkNotification") static let addSourceDeepLinkNotification = Notification.Name(Bundle.Info.appbundleIdentifier + ".AddSourceDeepLinkNotification")
static let appBackupDidFinish = Notification.Name("com.rileytestut.AltStore.AppBackupDidFinish") static let appBackupDidFinish = Notification.Name(Bundle.Info.appbundleIdentifier + ".AppBackupDidFinish")
static let importAppDeepLinkURLKey = "fileURL" static let importAppDeepLinkURLKey = "fileURL"
static let appBackupResultKey = "result" static let appBackupResultKey = "result"
static let addSourceDeepLinkURLKey = "sourceURL" static let addSourceDeepLinkURLKey = "sourceURL"

View File

@@ -45,7 +45,7 @@ public class Keychain
{ {
public static let shared = Keychain() public static let shared = Keychain()
fileprivate let keychain = KeychainAccess.Keychain(service: "com.rileytestut.AltStore").accessibility(.afterFirstUnlock).synchronizable(true) fileprivate let keychain = KeychainAccess.Keychain(service: Bundle.Info.appbundleIdentifier).accessibility(.afterFirstUnlock).synchronizable(true)
@KeychainItem(key: "appleIDEmailAddress") @KeychainItem(key: "appleIDEmailAddress")
public var appleIDEmailAddress: String? public var appleIDEmailAddress: String?

View File

@@ -11,9 +11,9 @@ import CoreData
public extension Source public extension Source
{ {
#if ALPHA #if ALPHA
static let altStoreIdentifier = "com.SideStore.SideStore" static let altStoreIdentifier = Bundle.Info.appbundleIdentifier
#else #else
static let altStoreIdentifier = "com.SideStore.SideStore" static let altStoreIdentifier = Bundle.Info.appbundleIdentifier
#endif #endif
#if STAGING #if STAGING

View File

@@ -15,11 +15,11 @@ import AltSign
public extension StoreApp public extension StoreApp
{ {
#if ALPHA #if ALPHA
static let altstoreAppID = "com.SideStore.SideStore" static let altstoreAppID = Bundle.Info.appbundleIdentifier
#elseif BETA #elseif BETA
static let altstoreAppID = "com.SideStore.SideStore" static let altstoreAppID = Bundle.Info.appbundleIdentifier
#else #else
static let altstoreAppID = "com.SideStore.SideStore" static let altstoreAppID = Bundle.Info.appbundleIdentifier
#endif #endif
static let dolphinAppID = "me.oatmealdome.dolphinios-njb" static let dolphinAppID = "me.oatmealdome.dolphinios-njb"

View File

@@ -59,14 +59,14 @@ struct ComplicationView_Previews: PreviewProvider {
let expiredDate = shortExpirationDate.addingTimeInterval(1 * 60 * 60 * 24) let expiredDate = shortExpirationDate.addingTimeInterval(1 * 60 * 60 * 24)
let weekAltstore = AppSnapshot(name: "AltStore", let weekAltstore = AppSnapshot(name: "AltStore",
bundleIdentifier: "com.rileytestut.AltStore", bundleIdentifier: Bundle.Info.appbundleIdentifier,
expirationDate: shortExpirationDate, expirationDate: shortExpirationDate,
refreshedDate: shortRefreshedDate, refreshedDate: shortRefreshedDate,
tintColor: .altPrimary, tintColor: .altPrimary,
icon: UIImage(named: "AltStore")) icon: UIImage(named: "AltStore"))
let yearAltstore = AppSnapshot(name: "AltStore", let yearAltstore = AppSnapshot(name: "AltStore",
bundleIdentifier: "com.rileytestut.AltStore", bundleIdentifier: Bundle.Info.appbundleIdentifier,
expirationDate: longExpirationDate, expirationDate: longExpirationDate,
refreshedDate: longRefreshedDate, refreshedDate: longRefreshedDate,
tintColor: .altPrimary, tintColor: .altPrimary,

View File

@@ -155,7 +155,7 @@ struct WidgetView_Previews: PreviewProvider {
let longExpirationDate = Calendar.current.date(byAdding: .day, value: 365, to: longRefreshedDate) ?? Date() let longExpirationDate = Calendar.current.date(byAdding: .day, value: 365, to: longRefreshedDate) ?? Date()
let altstore = AppSnapshot(name: "AltStore", let altstore = AppSnapshot(name: "AltStore",
bundleIdentifier: "com.rileytestut.AltStore", bundleIdentifier: Bundle.Info.appbundleIdentifier,
expirationDate: shortExpirationDate, expirationDate: shortExpirationDate,
refreshedDate: shortRefreshedDate, refreshedDate: shortRefreshedDate,
tintColor: .altPrimary, tintColor: .altPrimary,

View File

@@ -10,7 +10,7 @@ import AltSign
extension ALTApplication extension ALTApplication
{ {
static let altstoreBundleID = "com.SideStore.SideStore" static let altstoreBundleID = Bundle.Info.appbundleIdentifier
var isAltStoreApp: Bool { var isAltStoreApp: Bool {
let isAltStoreApp = self.bundleIdentifier.contains(ALTApplication.altstoreBundleID) let isAltStoreApp = self.bundleIdentifier.contains(ALTApplication.altstoreBundleID)

View File

@@ -17,6 +17,8 @@ public extension Bundle
public static let certificateID = "ALTCertificateID" public static let certificateID = "ALTCertificateID"
public static let appGroups = "ALTAppGroups" public static let appGroups = "ALTAppGroups"
public static let altBundleID = "ALTBundleIdentifier" public static let altBundleID = "ALTBundleIdentifier"
public static let orgbundleIdentifier = "com.SideStore"
public static let appbundleIdentifier = orgbundleIdentifier + ".SideStore"
public static let devicePairingString = "ALTPairingFile" public static let devicePairingString = "ALTPairingFile"
public static let urlTypes = "CFBundleURLTypes" public static let urlTypes = "CFBundleURLTypes"
public static let exportedUTIs = "UTExportedTypeDeclarations" public static let exportedUTIs = "UTExportedTypeDeclarations"