From 59896e4f896215d35025b1abd68265a222985fcd Mon Sep 17 00:00:00 2001 From: ny Date: Fri, 11 Oct 2024 02:50:48 -0400 Subject: [PATCH] Add a few more checks for app limits --- AltStore/Managing Apps/AppManager.swift | 2 +- AltStore/Settings/SettingsViewController.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AltStore/Managing Apps/AppManager.swift b/AltStore/Managing Apps/AppManager.swift index 9dd5104b..56b9184d 100644 --- a/AltStore/Managing Apps/AppManager.swift +++ b/AltStore/Managing Apps/AppManager.swift @@ -1017,7 +1017,7 @@ private extension AppManager func removeAppExtensions(from application: ALTApplication, extensions: Set, _ presentingViewController: UIViewController, completion: @escaping (Result) -> Void) { - guard !application.appExtensions.isEmpty else { return completion(.success(())) } + guard !application.appExtensions.isEmpty, !UserDefaults.standard.isAppLimitDisabled else { return completion(.success(())) } let firstSentence: String diff --git a/AltStore/Settings/SettingsViewController.swift b/AltStore/Settings/SettingsViewController.swift index 0d61a2af..f69b033f 100644 --- a/AltStore/Settings/SettingsViewController.swift +++ b/AltStore/Settings/SettingsViewController.swift @@ -331,6 +331,7 @@ private extension SettingsViewController @IBAction func toggleDisableAppLimit(_ sender: UISwitch) { UserDefaults.standard.isAppLimitDisabled = sender.isOn UserDefaults.standard.activeAppsLimit = sender.isOn ? Int.max : ALTActiveAppsLimit + UserDefaults.standard.activeAppLimitIncludesExtensions = !sender.isOn } @IBAction func toggleIsBackgroundRefreshEnabled(_ sender: UISwitch)