From 06d28ca663385659205b773f31883b41011ba466 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Thu, 2 Mar 2023 17:02:11 -0600 Subject: [PATCH] Removes unnecessary @available annotations --- AltStore/AppDelegate.swift | 1 - AltStore/Extensions/INInteraction+AltStore.swift | 2 -- AltStore/Extensions/UIDevice+Jailbreak.swift | 2 -- AltStore/Extensions/UIDevice+Vibration.swift | 2 -- AltStore/Intents/IntentHandler.swift | 1 - AltStore/Managing Apps/AppManager.swift | 3 --- AltStore/My Apps/MyAppsViewController.swift | 2 -- AltStore/Operations/Patch App/PatchAppOperation.swift | 2 -- AltStore/Operations/Patch App/PatchViewController.swift | 4 ---- AltStore/SceneDelegate.swift | 1 - AltStore/Settings/SettingsViewController.swift | 1 - AltStore/Sources/SourcesViewController.swift | 1 - AltStoreCore/Intents/ViewAppIntentHandler.swift | 1 - AltStoreCore/Patreon/PatreonAPI.swift | 1 - 14 files changed, 24 deletions(-) diff --git a/AltStore/AppDelegate.swift b/AltStore/AppDelegate.swift index a6e2bee9..35589978 100644 --- a/AltStore/AppDelegate.swift +++ b/AltStore/AppDelegate.swift @@ -119,7 +119,6 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { } } -@available(iOS 13, *) extension AppDelegate { func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration diff --git a/AltStore/Extensions/INInteraction+AltStore.swift b/AltStore/Extensions/INInteraction+AltStore.swift index e758304e..1f6fb095 100644 --- a/AltStore/Extensions/INInteraction+AltStore.swift +++ b/AltStore/Extensions/INInteraction+AltStore.swift @@ -8,8 +8,6 @@ import Intents -// Requires iOS 14 in-app intent handling. -@available(iOS 14, *) extension INInteraction { static func refreshAllApps() -> INInteraction diff --git a/AltStore/Extensions/UIDevice+Jailbreak.swift b/AltStore/Extensions/UIDevice+Jailbreak.swift index 78a6542e..a0197259 100644 --- a/AltStore/Extensions/UIDevice+Jailbreak.swift +++ b/AltStore/Extensions/UIDevice+Jailbreak.swift @@ -29,7 +29,6 @@ extension UIDevice } } - @available(iOS 14, *) var supportsFugu14: Bool { #if targetEnvironment(simulator) return true @@ -40,7 +39,6 @@ extension UIDevice #endif } - @available(iOS 14, *) var isUntetheredJailbreakRequired: Bool { let ios14_4 = OperatingSystemVersion(majorVersion: 14, minorVersion: 4, patchVersion: 0) diff --git a/AltStore/Extensions/UIDevice+Vibration.swift b/AltStore/Extensions/UIDevice+Vibration.swift index 3295e3c2..49c598f7 100644 --- a/AltStore/Extensions/UIDevice+Vibration.swift +++ b/AltStore/Extensions/UIDevice+Vibration.swift @@ -16,7 +16,6 @@ private extension SystemSoundID static let tryAgain = SystemSoundID(1102) } -@available(iOS 13, *) extension UIDevice { enum VibrationPattern @@ -26,7 +25,6 @@ extension UIDevice } } -@available(iOS 13, *) extension UIDevice { var isVibrationSupported: Bool { diff --git a/AltStore/Intents/IntentHandler.swift b/AltStore/Intents/IntentHandler.swift index 2d2ca70e..922ce24c 100644 --- a/AltStore/Intents/IntentHandler.swift +++ b/AltStore/Intents/IntentHandler.swift @@ -103,7 +103,6 @@ final class IntentHandler: NSObject, RefreshAllIntentHandling } } -@available(iOS 14, *) private extension IntentHandler { func finish(_ intent: RefreshAllIntent, response: RefreshAllIntentResponse) diff --git a/AltStore/Managing Apps/AppManager.swift b/AltStore/Managing Apps/AppManager.swift index b878ad3c..35168ec2 100644 --- a/AltStore/Managing Apps/AppManager.swift +++ b/AltStore/Managing Apps/AppManager.swift @@ -94,7 +94,6 @@ final class AppManager self.progressLock.deallocate() } - @available(iOS 13, *) func prepareSubscriptions() { /// Every time refreshProgress is changed, update all InstalledApps in memory @@ -704,7 +703,6 @@ extension AppManager self.run([removeAppOperation, removeAppBackupOperation], context: authenticationContext) } - @available(iOS 14, *) func enableJIT(for installedApp: InstalledApp, completionHandler: @escaping (Result) -> Void) { final class Context: OperationContext, EnableJITContext @@ -733,7 +731,6 @@ extension AppManager self.run([enableJITOperation], context: context, requiresSerialQueue: true) } - @available(iOS 14.0, *) func patch(resignedApp: ALTApplication, presentingViewController: UIViewController, context authContext: AuthenticatedOperationContext, completionHandler: @escaping (Result) -> Void) -> PatchAppOperation { final class Context: InstallAppOperationContext, PatchAppContext diff --git a/AltStore/My Apps/MyAppsViewController.swift b/AltStore/My Apps/MyAppsViewController.swift index 075bc1dd..ce2497a1 100644 --- a/AltStore/My Apps/MyAppsViewController.swift +++ b/AltStore/My Apps/MyAppsViewController.swift @@ -1388,7 +1388,6 @@ private extension MyAppsViewController } } - @available(iOS 14, *) func enableJIT(for installedApp: InstalledApp) { @@ -1641,7 +1640,6 @@ extension MyAppsViewController } } -@available(iOS 13.0, *) extension MyAppsViewController { private func actions(for installedApp: InstalledApp) -> [UIMenuElement] diff --git a/AltStore/Operations/Patch App/PatchAppOperation.swift b/AltStore/Operations/Patch App/PatchAppOperation.swift index 3cd4b583..9397cacb 100644 --- a/AltStore/Operations/Patch App/PatchAppOperation.swift +++ b/AltStore/Operations/Patch App/PatchAppOperation.swift @@ -15,7 +15,6 @@ import AltStoreCore import AltSign import Roxas -@available(iOS 14, *) protocol PatchAppContext { var bundleIdentifier: String { get } @@ -146,7 +145,6 @@ private let ALTFragmentZipCallback: @convention(c) (UInt32) -> Void = { (percent progress.completedUnitCount = Int64(percentageComplete) } -@available(iOS 14, *) private extension PatchAppOperation { func fetchOTAUpdate() -> AnyPublisher diff --git a/AltStore/Operations/Patch App/PatchViewController.swift b/AltStore/Operations/Patch App/PatchViewController.swift index 0e44826b..14d79c8d 100644 --- a/AltStore/Operations/Patch App/PatchViewController.swift +++ b/AltStore/Operations/Patch App/PatchViewController.swift @@ -13,7 +13,6 @@ import AltStoreCore import AltSign import Roxas -@available(iOS 14.0, *) extension PatchViewController { enum Step @@ -99,7 +98,6 @@ final class PatchViewController: UIViewController } } -@available(iOS 14.0, *) private extension PatchViewController { func update() @@ -212,7 +210,6 @@ private extension PatchViewController } } -@available(iOS 14.0, *) private extension PatchViewController { @IBAction func performButtonAction() @@ -254,7 +251,6 @@ private extension PatchViewController } } -@available(iOS 14.0, *) private extension PatchViewController { func startProcess() diff --git a/AltStore/SceneDelegate.swift b/AltStore/SceneDelegate.swift index c195f3ea..8ec91a46 100644 --- a/AltStore/SceneDelegate.swift +++ b/AltStore/SceneDelegate.swift @@ -75,7 +75,6 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate } } -@available(iOS 13.0, *) private extension SceneDelegate { func open(_ context: UIOpenURLContext) diff --git a/AltStore/Settings/SettingsViewController.swift b/AltStore/Settings/SettingsViewController.swift index b5689737..540727e6 100644 --- a/AltStore/Settings/SettingsViewController.swift +++ b/AltStore/Settings/SettingsViewController.swift @@ -390,7 +390,6 @@ private extension SettingsViewController } } - @available(iOS 14, *) @IBAction func addRefreshAppsShortcut() { guard let shortcut = INShortcut(intent: INInteraction.refreshAllApps().intent) else { return } diff --git a/AltStore/Sources/SourcesViewController.swift b/AltStore/Sources/SourcesViewController.swift index 350f8dcf..ea785a9b 100644 --- a/AltStore/Sources/SourcesViewController.swift +++ b/AltStore/Sources/SourcesViewController.swift @@ -586,7 +586,6 @@ extension SourcesViewController: UICollectionViewDelegateFlowLayout } } -@available(iOS 13, *) extension SourcesViewController { override func collectionView(_ collectionView: UICollectionView, contextMenuConfigurationForItemAt indexPath: IndexPath, point: CGPoint) -> UIContextMenuConfiguration? diff --git a/AltStoreCore/Intents/ViewAppIntentHandler.swift b/AltStoreCore/Intents/ViewAppIntentHandler.swift index 798f2a64..028cd031 100644 --- a/AltStoreCore/Intents/ViewAppIntentHandler.swift +++ b/AltStoreCore/Intents/ViewAppIntentHandler.swift @@ -9,7 +9,6 @@ import Intents import AltStoreCore -@available(iOS 14, *) public class ViewAppIntentHandler: NSObject, ViewAppIntentHandling { public func provideAppOptionsCollection(for intent: ViewAppIntent, with completion: @escaping (INObjectCollection?, Error?) -> Void) diff --git a/AltStoreCore/Patreon/PatreonAPI.swift b/AltStoreCore/Patreon/PatreonAPI.swift index 0eae5c7f..2d19275c 100644 --- a/AltStoreCore/Patreon/PatreonAPI.swift +++ b/AltStoreCore/Patreon/PatreonAPI.swift @@ -425,7 +425,6 @@ private extension PatreonAPI } } -@available(iOS 13.0, *) extension PatreonAPI: ASWebAuthenticationPresentationContextProviding { public func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor