From 07f8c38820ecb6319290ecdb6376597b574e22ba Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 3 Mar 2021 17:23:56 -0600 Subject: [PATCH 1/4] [Apps] Updates AltStore beta to 1.4.4b --- AltStore/Resources/apps.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AltStore/Resources/apps.json b/AltStore/Resources/apps.json index ce921465..79262fe1 100644 --- a/AltStore/Resources/apps.json +++ b/AltStore/Resources/apps.json @@ -36,14 +36,14 @@ "bundleIdentifier": "com.rileytestut.AltStore.Beta", "developerName": "Riley Testut", "subtitle": "An alternative App Store for iOS.", - "version": "1.4.3b2", - "versionDate": "2021-02-01T21:30:00-06:00", - "versionDescription": "This beta fixes the remaining edge cases causing apps installed after January 28 to crash on launch.\n\n⚠️ This update must be installed manually. Download the latest AltServer beta from Patreon and use it to reinstall AltStore. You do not need to delete AltStore first.", - "downloadURL": "https://f000.backblazeb2.com/file/altstore/apps/altstore/1_4_3_b2.ipa", + "version": "1.4.4b", + "versionDate": "2021-03-01T14:30:00-06:00", + "versionDescription": "• Fixes apps not launching on iOS 14.5*\n• Fixes \"This device is already registered with this team\" error*\n• Fixes AltDaemon untrusting apps after refresh on iOS 14\n\n* Requires reinstalling AltStore with latest AltServer beta from Patreon", + "downloadURL": "https://f000.backblazeb2.com/file/altstore/apps/altstore/1_4_4_b.ipa", "localizedDescription": "AltStore is an alternative app store for non-jailbroken devices. \n\nThis beta release of AltStore adds support for 3rd party sources, allowing you to download apps from other developers directly through AltStore.", "iconURL": "https://user-images.githubusercontent.com/705880/65270980-1eb96f80-dad1-11e9-9367-78ccd25ceb02.png", "tintColor": "018084", - "size": 4786864, + "size": 4789109, "beta": true, "screenshotURLs": [ "https://user-images.githubusercontent.com/705880/78942028-acf54300-7a6d-11ea-821c-5bb7a9b3e73a.PNG", From 3f09a796454b445229be16b60c877835754e2d12 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 9 Mar 2021 13:13:23 -0600 Subject: [PATCH 2/4] Fixes (de-)activating apps deadlock 729b2a1f made all serial operations execute in FIFO order. This caused circular dependencies between BackupAppOperation and InstallAppOperation, resulting in (de-)activating apps never finishing. Now, we ensure InstallAppOperations that are reinstalling AltStore always execute last in a context, but other serial operations may run in any order they become ready. --- AltStore/Managing Apps/AppManager.swift | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/AltStore/Managing Apps/AppManager.swift b/AltStore/Managing Apps/AppManager.swift index 7785f37d..d27e5ceb 100644 --- a/AltStore/Managing Apps/AppManager.swift +++ b/AltStore/Managing Apps/AppManager.swift @@ -1403,9 +1403,9 @@ private extension AppManager func run(_ operations: [Foundation.Operation], context: OperationContext?, requiresSerialQueue: Bool = false) { - // Reference to previous serial operation in context used to enforce FIFO, - // even if the operations become ready in a different order than submitted. - var previousSerialOperation: Foundation.Operation? = context?.operations.allObjects.filter { self.serialOperationQueue.operations.contains($0) }.last + // Find "Install AltStore" operation if it already exists in `context` + // so we can ensure it runs after any additional serial operations in `operations`. + let installAltStoreOperation = context?.operations.allObjects.lazy.compactMap { $0 as? InstallAppOperation }.first { $0.context.bundleIdentifier == StoreApp.altstoreAppID } for operation in operations { @@ -1413,16 +1413,20 @@ private extension AppManager { case _ where requiresSerialQueue: fallthrough case is InstallAppOperation, is RefreshAppOperation, is BackupAppOperation: - if let previousOperation = previousSerialOperation + if let installAltStoreOperation = operation as? InstallAppOperation, installAltStoreOperation.context.bundleIdentifier == StoreApp.altstoreAppID { - // Add dependency on previous serial operation to enforce FIFO. - operation.addDependency(previousOperation) + // Add dependencies on previous serial operations in `context` to ensure re-installing AltStore goes last. + let previousSerialOperations = context?.operations.allObjects.filter { self.serialOperationQueue.operations.contains($0) } + previousSerialOperations?.forEach { installAltStoreOperation.addDependency($0) } + } + else if let installAltStoreOperation = installAltStoreOperation + { + // Re-installing AltStore should _always_ be the last serial operation in `context`. + installAltStoreOperation.addDependency(operation) } self.serialOperationQueue.addOperation(operation) - previousSerialOperation = operation - default: self.operationQueue.addOperation(operation) } From dbd27e6113b342d70812f39b29dbab356ca55ef9 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 9 Mar 2021 13:39:34 -0600 Subject: [PATCH 3/4] Fixes potential crash after failing to activate an app --- Dependencies/Roxas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dependencies/Roxas b/Dependencies/Roxas index 84645e43..5fdf9ef9 160000 --- a/Dependencies/Roxas +++ b/Dependencies/Roxas @@ -1 +1 @@ -Subproject commit 84645e43182eb2c8fd5904d9e7e379ad2a1b94cb +Subproject commit 5fdf9ef9deaf31e1f6f670a5a463a4a9df31f283 From 248444c04da3b241f504e093b56512ee663812e7 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 9 Mar 2021 13:41:17 -0600 Subject: [PATCH 4/4] Updates app version to 1.4.5b --- AltStore.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AltStore.xcodeproj/project.pbxproj b/AltStore.xcodeproj/project.pbxproj index 8dac03b3..9c46e39c 100644 --- a/AltStore.xcodeproj/project.pbxproj +++ b/AltStore.xcodeproj/project.pbxproj @@ -3242,7 +3242,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.4; + MARKETING_VERSION = 1.4.5b; PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.AltStore; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3270,7 +3270,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.4.4; + MARKETING_VERSION = 1.4.5b; PRODUCT_BUNDLE_IDENTIFIER = com.rileytestut.AltStore; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "";