From 961bc5aa66e1ae7d6554af448169bc39e9b9c56b 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 | 2 -- AltStore/Managing Apps/AppManager.swift | 4 ---- AltStore/My Apps/MyAppsViewController.swift | 2 -- AltStore/Operations/EnableJITOperation.swift | 2 -- AltStore/Operations/Patch App/PatchAppOperation.swift | 3 --- AltStore/Operations/Patch App/PatchViewController.swift | 5 ----- AltStore/SceneDelegate.swift | 2 -- AltStore/Settings/Error Log/ErrorLogTableViewCell.swift | 1 - AltStore/Settings/SettingsViewController.swift | 1 - AltStore/Sources/SourcesViewController.swift | 1 - AltStoreCore/Intents/ViewAppIntentHandler.swift | 1 - AltStoreCore/Patreon/PatreonAPI.swift | 1 - 16 files changed, 32 deletions(-) diff --git a/AltStore/AppDelegate.swift b/AltStore/AppDelegate.swift index 48303f42..e718b7ac 100644 --- a/AltStore/AppDelegate.swift +++ b/AltStore/AppDelegate.swift @@ -121,7 +121,6 @@ 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 0aec1c00..e0f5c8ac 100644 --- a/AltStore/Intents/IntentHandler.swift +++ b/AltStore/Intents/IntentHandler.swift @@ -10,7 +10,6 @@ import Foundation import AltStoreCore -@available(iOS 14, *) class IntentHandler: NSObject, RefreshAllIntentHandling { private let queue = DispatchQueue(label: "io.altstore.IntentHandler") @@ -91,7 +90,6 @@ 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 27373eb8..be9996f9 100644 --- a/AltStore/Managing Apps/AppManager.swift +++ b/AltStore/Managing Apps/AppManager.swift @@ -33,7 +33,6 @@ extension AppManager } } -@available(iOS 13, *) class AppManagerPublisher: ObservableObject { @Published @@ -92,7 +91,6 @@ class AppManager self.progressLock.deallocate() } - @available(iOS 13, *) func prepareSubscriptions() { /// Every time refreshProgress is changed, update all InstalledApps in memory @@ -697,7 +695,6 @@ extension AppManager self.run([removeAppOperation, removeAppBackupOperation], context: authenticationContext) } - @available(iOS 14, *) func enableJIT(for installedApp: InstalledApp, completionHandler: @escaping (Result) -> Void) { class Context: OperationContext, EnableJITContext @@ -730,7 +727,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 { class Context: InstallAppOperationContext, PatchAppContext diff --git a/AltStore/My Apps/MyAppsViewController.swift b/AltStore/My Apps/MyAppsViewController.swift index 0016d124..03ef2d89 100644 --- a/AltStore/My Apps/MyAppsViewController.swift +++ b/AltStore/My Apps/MyAppsViewController.swift @@ -1415,7 +1415,6 @@ private extension MyAppsViewController } } - @available(iOS 14, *) func enableJIT(for installedApp: InstalledApp) { AppManager.shared.enableJIT(for: installedApp) { result in @@ -1655,7 +1654,6 @@ extension MyAppsViewController } } -@available(iOS 13.0, *) extension MyAppsViewController { private func actions(for installedApp: InstalledApp) -> [UIMenuElement] diff --git a/AltStore/Operations/EnableJITOperation.swift b/AltStore/Operations/EnableJITOperation.swift index 9aa5ebee..713823ca 100644 --- a/AltStore/Operations/EnableJITOperation.swift +++ b/AltStore/Operations/EnableJITOperation.swift @@ -11,7 +11,6 @@ import Combine import AltStoreCore -@available(iOS 14, *) protocol EnableJITContext { var server: Server? { get } @@ -20,7 +19,6 @@ protocol EnableJITContext var error: Error? { get } } -@available(iOS 14, *) class EnableJITOperation: ResultOperation { let context: Context diff --git a/AltStore/Operations/Patch App/PatchAppOperation.swift b/AltStore/Operations/Patch App/PatchAppOperation.swift index c19723e4..1c6c4259 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 } @@ -71,7 +70,6 @@ private struct OTAUpdate var archivePath: String } -@available(iOS 14, *) class PatchAppOperation: ResultOperation { let context: PatchAppContext @@ -148,7 +146,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 1c41f2ec..37b1a6c8 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 @@ -28,7 +27,6 @@ extension PatchViewController } } -@available(iOS 14.0, *) class PatchViewController: UIViewController { var patchApp: AnyApp? @@ -99,7 +97,6 @@ class PatchViewController: UIViewController } } -@available(iOS 14.0, *) private extension PatchViewController { func update() @@ -212,7 +209,6 @@ private extension PatchViewController } } -@available(iOS 14.0, *) private extension PatchViewController { @IBAction func performButtonAction() @@ -254,7 +250,6 @@ private extension PatchViewController } } -@available(iOS 14.0, *) private extension PatchViewController { func startProcess() diff --git a/AltStore/SceneDelegate.swift b/AltStore/SceneDelegate.swift index 81256469..975c1bdc 100644 --- a/AltStore/SceneDelegate.swift +++ b/AltStore/SceneDelegate.swift @@ -9,7 +9,6 @@ import UIKit import AltStoreCore -@available(iOS 13, *) class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? @@ -75,7 +74,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate } } -@available(iOS 13.0, *) private extension SceneDelegate { func open(_ context: UIOpenURLContext) diff --git a/AltStore/Settings/Error Log/ErrorLogTableViewCell.swift b/AltStore/Settings/Error Log/ErrorLogTableViewCell.swift index a1f66b07..cbffa3e9 100644 --- a/AltStore/Settings/Error Log/ErrorLogTableViewCell.swift +++ b/AltStore/Settings/Error Log/ErrorLogTableViewCell.swift @@ -11,7 +11,6 @@ import UIKit @objc(ErrorLogMenuButton) private class ErrorLogMenuButton: UIButton { - @available(iOS 14.0, *) override func menuAttachmentPoint(for configuration: UIContextMenuConfiguration) -> CGPoint { var point = super.menuAttachmentPoint(for: configuration) diff --git a/AltStore/Settings/SettingsViewController.swift b/AltStore/Settings/SettingsViewController.swift index ad9b271f..6ab60793 100644 --- a/AltStore/Settings/SettingsViewController.swift +++ b/AltStore/Settings/SettingsViewController.swift @@ -320,7 +320,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 5684727c..016c26fa 100644 --- a/AltStore/Sources/SourcesViewController.swift +++ b/AltStore/Sources/SourcesViewController.swift @@ -566,7 +566,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 26ec8ea4..f5f4cd82 100644 --- a/AltStoreCore/Patreon/PatreonAPI.swift +++ b/AltStoreCore/Patreon/PatreonAPI.swift @@ -408,7 +408,6 @@ private extension PatreonAPI } } -@available(iOS 13.0, *) extension PatreonAPI: ASWebAuthenticationPresentationContextProviding { public func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor