Updates AltSign dependency

This commit is contained in:
Riley Testut
2020-12-03 14:45:34 -06:00
parent bb3b039672
commit 3b45ab7f62
5 changed files with 8 additions and 11 deletions

View File

@@ -582,7 +582,7 @@ private extension AuthenticationOperation
return completionHandler(.failure(OperationError.unknownUDID)) 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 do
{ {
let devices = try Result(devices, error).get() let devices = try Result(devices, error).get()
@@ -593,7 +593,7 @@ private extension AuthenticationOperation
} }
else 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)) completionHandler(Result(device, error))
} }
} }

View File

@@ -133,7 +133,7 @@ extension FetchProvisioningProfilesOperation
#if DEBUG #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. // Use legacy bundle ID format for AltStore.
preferredBundleID = "com.\(team.identifier).\(app.bundleIdentifier)" preferredBundleID = "com.\(team.identifier).\(app.bundleIdentifier)"
@@ -178,7 +178,7 @@ extension FetchProvisioningProfilesOperation
let parentBundleID = parentApp?.bundleIdentifier ?? app.bundleIdentifier let parentBundleID = parentApp?.bundleIdentifier ?? app.bundleIdentifier
let updatedParentBundleID: String 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). // Use legacy bundle ID format for AltStore (and its extensions).
updatedParentBundleID = "com.\(team.identifier).\(parentBundleID)" updatedParentBundleID = "com.\(team.identifier).\(parentBundleID)"
@@ -463,7 +463,7 @@ extension FetchProvisioningProfilesOperation
func fetchProvisioningProfile(for appID: ALTAppID, team: ALTTeam, session: ALTAppleAPISession, completionHandler: @escaping (Result<ALTProvisioningProfile, Error>) -> Void) func fetchProvisioningProfile(for appID: ALTAppID, team: ALTTeam, session: ALTAppleAPISession, completionHandler: @escaping (Result<ALTProvisioningProfile, Error>) -> 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) switch Result(profile, error)
{ {
case .failure(let error): completionHandler(.failure(error)) case .failure(let error): completionHandler(.failure(error))
@@ -477,7 +477,7 @@ extension FetchProvisioningProfilesOperation
case .success: case .success:
// Fetch new provisiong profile // 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)) completionHandler(Result(profile, error))
} }
} }

View File

@@ -169,7 +169,7 @@ private extension ResignAppOperation
var additionalValues: [String: Any] = [Bundle.Info.urlTypes: allURLSchemes] 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 } guard let udid = Bundle.main.object(forInfoDictionaryKey: Bundle.Info.deviceID) as? String else { throw OperationError.unknownUDID }
additionalValues[Bundle.Info.deviceID] = udid additionalValues[Bundle.Info.deviceID] = udid

View File

@@ -16,13 +16,10 @@ public extension StoreApp
{ {
#if ALPHA #if ALPHA
static let altstoreAppID = "com.rileytestut.AltStore.Alpha" static let altstoreAppID = "com.rileytestut.AltStore.Alpha"
static let alternativeAltStoreAppIDs: Set<String> = ["com.rileytestut.AltStore", "com.rileytestut.AltStore.Beta"]
#elseif BETA #elseif BETA
static let altstoreAppID = "com.rileytestut.AltStore.Beta" static let altstoreAppID = "com.rileytestut.AltStore.Beta"
static let alternativeAltStoreAppIDs: Set<String> = ["com.rileytestut.AltStore", "com.rileytestut.AltStore.Alpha"]
#else #else
static let altstoreAppID = "com.rileytestut.AltStore" static let altstoreAppID = "com.rileytestut.AltStore"
static let alternativeAltStoreAppIDs: Set<String> = ["com.rileytestut.AltStore.Beta", "com.rileytestut.AltStore.Alpha"]
#endif #endif
static let dolphinAppID = "me.oatmealdome.dolphinios-njb" static let dolphinAppID = "me.oatmealdome.dolphinios-njb"