diff --git a/AltStore/Operations/AuthenticationOperation.swift b/AltStore/Operations/AuthenticationOperation.swift index 9a925262..36876e4a 100644 --- a/AltStore/Operations/AuthenticationOperation.swift +++ b/AltStore/Operations/AuthenticationOperation.swift @@ -582,7 +582,7 @@ private extension AuthenticationOperation return completionHandler(.failure(OperationError.unknownUDID)) } - ALTAppleAPI.shared.fetchDevices(for: team, session: session) { (devices, error) in + ALTAppleAPI.shared.fetchDevices(for: team, types: [.iphone, .ipad], session: session) { (devices, error) in do { let devices = try Result(devices, error).get() @@ -593,7 +593,7 @@ private extension AuthenticationOperation } else { - ALTAppleAPI.shared.registerDevice(name: UIDevice.current.name, identifier: udid, team: team, session: session) { (device, error) in + ALTAppleAPI.shared.registerDevice(name: UIDevice.current.name, identifier: udid, type: .iphone, team: team, session: session) { (device, error) in completionHandler(Result(device, error)) } } diff --git a/AltStore/Operations/FetchProvisioningProfilesOperation.swift b/AltStore/Operations/FetchProvisioningProfilesOperation.swift index b48cf9f4..0a836d04 100644 --- a/AltStore/Operations/FetchProvisioningProfilesOperation.swift +++ b/AltStore/Operations/FetchProvisioningProfilesOperation.swift @@ -133,7 +133,7 @@ extension FetchProvisioningProfilesOperation #if DEBUG - if app.bundleIdentifier.hasPrefix(StoreApp.altstoreAppID) || StoreApp.alternativeAltStoreAppIDs.contains(where: app.bundleIdentifier.hasPrefix) + if app.isAltStoreApp { // Use legacy bundle ID format for AltStore. preferredBundleID = "com.\(team.identifier).\(app.bundleIdentifier)" @@ -178,7 +178,7 @@ extension FetchProvisioningProfilesOperation let parentBundleID = parentApp?.bundleIdentifier ?? app.bundleIdentifier let updatedParentBundleID: String - if app.bundleIdentifier.hasPrefix(StoreApp.altstoreAppID) || StoreApp.alternativeAltStoreAppIDs.contains(where: app.bundleIdentifier.hasPrefix) + if app.isAltStoreApp { // Use legacy bundle ID format for AltStore (and its extensions). updatedParentBundleID = "com.\(team.identifier).\(parentBundleID)" @@ -463,7 +463,7 @@ extension FetchProvisioningProfilesOperation func fetchProvisioningProfile(for appID: ALTAppID, team: ALTTeam, session: ALTAppleAPISession, completionHandler: @escaping (Result) -> Void) { - ALTAppleAPI.shared.fetchProvisioningProfile(for: appID, team: team, session: session) { (profile, error) in + ALTAppleAPI.shared.fetchProvisioningProfile(for: appID, deviceType: .iphone, team: team, session: session) { (profile, error) in switch Result(profile, error) { case .failure(let error): completionHandler(.failure(error)) @@ -477,7 +477,7 @@ extension FetchProvisioningProfilesOperation case .success: // Fetch new provisiong profile - ALTAppleAPI.shared.fetchProvisioningProfile(for: appID, team: team, session: session) { (profile, error) in + ALTAppleAPI.shared.fetchProvisioningProfile(for: appID, deviceType: .iphone, team: team, session: session) { (profile, error) in completionHandler(Result(profile, error)) } } diff --git a/AltStore/Operations/ResignAppOperation.swift b/AltStore/Operations/ResignAppOperation.swift index 64884e0c..38f2e51d 100644 --- a/AltStore/Operations/ResignAppOperation.swift +++ b/AltStore/Operations/ResignAppOperation.swift @@ -169,7 +169,7 @@ private extension ResignAppOperation var additionalValues: [String: Any] = [Bundle.Info.urlTypes: allURLSchemes] - if self.context.bundleIdentifier == StoreApp.altstoreAppID || StoreApp.alternativeAltStoreAppIDs.contains(self.context.bundleIdentifier) + if app.isAltStoreApp { guard let udid = Bundle.main.object(forInfoDictionaryKey: Bundle.Info.deviceID) as? String else { throw OperationError.unknownUDID } additionalValues[Bundle.Info.deviceID] = udid diff --git a/AltStoreCore/Model/StoreApp.swift b/AltStoreCore/Model/StoreApp.swift index 58b05c37..b5797521 100644 --- a/AltStoreCore/Model/StoreApp.swift +++ b/AltStoreCore/Model/StoreApp.swift @@ -16,13 +16,10 @@ public extension StoreApp { #if ALPHA static let altstoreAppID = "com.rileytestut.AltStore.Alpha" - static let alternativeAltStoreAppIDs: Set = ["com.rileytestut.AltStore", "com.rileytestut.AltStore.Beta"] #elseif BETA static let altstoreAppID = "com.rileytestut.AltStore.Beta" - static let alternativeAltStoreAppIDs: Set = ["com.rileytestut.AltStore", "com.rileytestut.AltStore.Alpha"] #else static let altstoreAppID = "com.rileytestut.AltStore" - static let alternativeAltStoreAppIDs: Set = ["com.rileytestut.AltStore.Beta", "com.rileytestut.AltStore.Alpha"] #endif static let dolphinAppID = "me.oatmealdome.dolphinios-njb" diff --git a/Dependencies/AltSign b/Dependencies/AltSign index 2856e479..b027505d 160000 --- a/Dependencies/AltSign +++ b/Dependencies/AltSign @@ -1 +1 @@ -Subproject commit 2856e479c3447b361b98bfc2b5489841f997ebe1 +Subproject commit b027505dcc228aa854272f55bb4fcd31cdf2d96e