Signed-off-by: Joseph Mattello <mail@joemattiello.com>
This commit is contained in:
Joseph Mattello
2023-04-02 02:28:12 -04:00
parent 2c829895c9
commit c4c2d17ffc
126 changed files with 1639 additions and 124 deletions

View File

@@ -1,6 +1,9 @@
import ArgumentParser
import SwiftLintFramework
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
extension Cargo {
struct Version: ParsableCommand {

View File

@@ -1,6 +1,9 @@
import ArgumentParser
import SwiftLintFramework
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
extension SwiftLint {
struct Version: ParsableCommand {

View File

@@ -6,7 +6,10 @@
//
import Foundation
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
@_exported import minimuxer
public enum Uhoh: Error {
@@ -19,6 +22,7 @@ public func start_minimuxer(pairing_file: String) -> Int32 {
let pf_pointer = UnsafeMutablePointer<CChar>(mutating: pf.utf8String)
let u = NSString(string: getDocumentsDirectory().absoluteString)
let u_ptr = UnsafeMutablePointer<CChar>(mutating: u.utf8String)
return minimuxer_c_start(pf_pointer, u_ptr)
}

View File

@@ -7,7 +7,10 @@
//
import UIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
extension AppDelegate {
static let startBackupNotification = Notification.Name("io.altstore.StartBackup")

View File

@@ -7,7 +7,10 @@
//
import Foundation
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import AltSign
import Roxas

View File

@@ -9,7 +9,10 @@
import Foundation
import SideKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
typealias DaemonConnectionManager = ConnectionManager<DaemonRequestHandler>

View File

@@ -10,7 +10,10 @@ import AVFoundation
import Intents
import UIKit
import UserNotifications
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import AltSign
import SideStoreCore

View File

@@ -10,7 +10,10 @@ import SideStoreCore
import EmotionalDamage
import SideStoreAppKit
import UIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
@available(iOS 13, *)
final class SceneDelegate: UIResponder, UIWindowSceneDelegate {

View File

@@ -9,7 +9,10 @@
import Foundation
import Network
import SideKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
public protocol SideConnection: Connection {
func __send(_ data: Data, completionHandler: @escaping (Bool, Error?) -> Void)

View File

@@ -9,7 +9,10 @@
import Foundation
import Network
import SideKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
public protocol RequestHandler {
func handleAnisetteDataRequest(_ request: AnisetteDataRequest, for connection: Connection, completionHandler: @escaping (Result<AnisetteDataResponse, Error>) -> Void)

View File

@@ -8,7 +8,10 @@
import Foundation
import SideKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
@objc private protocol XPCConnectionProxy {
func ping(completionHandler: @escaping () -> Void)

View File

@@ -6,7 +6,8 @@
// Copyright © 2019 Riley Testut. All rights reserved.
//
import UIKit
#if canImport(UIKit)
import UIKit.UIColor
public extension UIColor {
// Borrowed from https://stackoverflow.com/a/26341062
@@ -69,3 +70,4 @@ public extension UIColor {
)
}
}
#endif

View File

@@ -7,7 +7,6 @@
//
import CoreData
import UIKit
public extension ALTAppPermissionType {
var localizedShortName: String? {
@@ -41,30 +40,6 @@ public extension ALTAppPermissionType {
default: return nil
}
}
var icon: UIImage? {
switch self {
case .photos: return UIImage(systemName: "photo.on.rectangle.angled")
case .camera: return UIImage(systemName: "camera.fill")
case .location: return UIImage(systemName: "location.fill")
case .contacts: return UIImage(systemName: "person.2.fill")
case .reminders: return UIImage(systemName: "checklist")
case .appleMusic: return UIImage(systemName: "music.note")
case .microphone: return UIImage(systemName: "mic.fill")
case .speechRecognition: return UIImage(systemName: "waveform.and.mic")
case .backgroundAudio: return UIImage(systemName: "speaker.fill")
case .backgroundFetch: return UIImage(systemName: "square.and.arrow.down")
case .bluetooth: return UIImage(systemName: "wave.3.right")
case .network: return UIImage(systemName: "network")
case .calendars: return UIImage(systemName: "calendar")
case .touchID: return UIImage(systemName: "touchid")
case .faceID: return UIImage(systemName: "faceid")
case .siri: return UIImage(systemName: "mic.and.signal.meter.fill")
case .motion: return UIImage(systemName: "figure.walk.motion")
default:
return nil
}
}
}
@objc(AppPermission)

View File

@@ -10,7 +10,10 @@ import CoreData
import AltSign
import Roxas
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
private extension CFNotificationName {
static let willAccessDatabase = CFNotificationName("com.rileytestut.AltStore.WillAccessDatabase" as CFString)

View File

@@ -9,7 +9,10 @@
import CoreData
import Roxas
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
open class MergePolicy: RSTRelationshipPreservingMergePolicy {
override open func resolve(constraintConflicts conflicts: [NSConstraintConflict]) throws {

View File

@@ -7,7 +7,15 @@
//
import CoreData
import UIKit
#if canImport(UIKit)
import class UIKit.UIColor
#elseif canImport(AppKit)
import class AppKit.NSColor
fileprivate typealias UIColor = NSColor
#else
#error ("Unsupported platform. Need to refactor UIColor/NSColor to extend support.")
#endif
@objc(NewsItem)
public class NewsItem: NSManagedObject, Decodable, Fetchable {

View File

@@ -7,7 +7,7 @@
//
import CoreData
import UIKit
import Foundation
public extension Source {
#if ALPHA

View File

@@ -8,8 +8,15 @@
import CoreData
import Foundation
import class UIKit.UIColor
#if canImport(UIKit)
import class UIKit.UIColor
#elseif canImport(AppKit)
import class AppKit.NSColor
fileprivate typealias UIColor = NSColor
#else
#error ("Unsupported platform. Need to refactor UIColor/NSColor to extend support.")
#endif
import Roxas
public extension StoreApp {

View File

@@ -9,7 +9,10 @@
import AuthenticationServices
import CoreData
import Foundation
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
private let clientID = "ZMx0EGUWe4TVWYXNZZwK_fbIK5jHFVWoUf1Qb-sqNXmT-YzAGwDPxxq7ak3_W5Q2"
private let clientSecret = "1hktsZB89QyN69cB4R0tu55R4TCPQGXxvebYUUh7Y-5TLSnRswuxs6OUjdJ74IJt"
@@ -115,8 +118,9 @@ public extension PatreonAPI {
}
}
if #available(iOS 13.0, *) {
self.authenticationSession?.presentationContextProvider = self
if let provider = self as? ASWebAuthenticationPresentationContextProviding,
let authenticationSession = self.authenticationSession {
authenticationSession.presentationContextProvider = provider
}
authenticationSession?.start()
@@ -359,10 +363,3 @@ private extension PatreonAPI {
installedApps.forEach { $0.isActive = false }
}
}
@available(iOS 13.0, *)
extension PatreonAPI: ASWebAuthenticationPresentationContextProviding {
public func presentationAnchor(for _: ASWebAuthenticationSession) -> ASPresentationAnchor {
UIApplication.alt_shared?.keyWindow ?? UIWindow()
}
}

View File

@@ -10,7 +10,10 @@ import UIKit
import SideStoreCore
import RoxasUIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import Nuke

View File

@@ -11,7 +11,10 @@ import IntentsUI
import MessageUI
import SafariServices
import UIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import AltSign

View File

@@ -9,7 +9,10 @@
import UIKit
import RoxasUIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import Nuke

View File

@@ -10,7 +10,10 @@ import UIKit
import SideStoreCore
import RoxasUIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import Nuke

View File

@@ -7,7 +7,10 @@
//
import Foundation
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
extension FileManager {
func directorySize(at directoryURL: URL) -> Int? {

View File

@@ -7,6 +7,7 @@
//
import UIKit
import SideStoreCore
public extension UIColor {
private static let colorBundle = Bundle(for: DatabaseManager.self)

View File

@@ -19,7 +19,10 @@ import AltSign
import SideKit
import SideStoreCore
import RoxasUIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
public extension AppManager {
static let didFetchSourceNotification = Notification.Name("io.altstore.AppManager.didFetchSource")

View File

@@ -0,0 +1,38 @@
//
// AppPermission+UIKit.swift
// AltStore
//
// Created by Riley Testut on 7/23/19.
// Copyright © 2019 Riley Testut. All rights reserved.
//
import CoreData
import SideStoreCore
import UIKit
// ALTAppPermissionType UIKit Extensions
public extension ALTAppPermissionType {
var icon: UIImage? {
switch self {
case .photos: return UIImage(systemName: "photo.on.rectangle.angled")
case .camera: return UIImage(systemName: "camera.fill")
case .location: return UIImage(systemName: "location.fill")
case .contacts: return UIImage(systemName: "person.2.fill")
case .reminders: return UIImage(systemName: "checklist")
case .appleMusic: return UIImage(systemName: "music.note")
case .microphone: return UIImage(systemName: "mic.fill")
case .speechRecognition: return UIImage(systemName: "waveform.and.mic")
case .backgroundAudio: return UIImage(systemName: "speaker.fill")
case .backgroundFetch: return UIImage(systemName: "square.and.arrow.down")
case .bluetooth: return UIImage(systemName: "wave.3.right")
case .network: return UIImage(systemName: "network")
case .calendars: return UIImage(systemName: "calendar")
case .touchID: return UIImage(systemName: "touchid")
case .faceID: return UIImage(systemName: "faceid")
case .siri: return UIImage(systemName: "mic.and.signal.meter.fill")
case .motion: return UIImage(systemName: "figure.walk.motion")
default:
return nil
}
}
}

View File

@@ -14,7 +14,10 @@ import UIKit
import AltSign
import SideStoreCore
import RoxasUIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import Nuke

View File

@@ -13,7 +13,10 @@ import SideStoreCore
import RoxasUIKit
import Nuke
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
private final class AppBannerFooterView: UICollectionReusableView {
let bannerView = AppBannerView(frame: .zero)

View File

@@ -12,7 +12,11 @@ import UIKit
import AltSign
import SideStoreCore
import RoxasUIKit
import os.log
import SideUIShared
import OSLog
#if canImport(Logging)
import Logging
#endif
@available(iOS 14.0, *)
extension PatchViewController {

View File

@@ -14,7 +14,10 @@ import RoxasUIKit
import SideKit
import Nuke
import QuickLook
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
final class ErrorLogViewController: UITableViewController {
private lazy var dataSource = self.makeDataSource()

View File

@@ -11,7 +11,10 @@ import UIKit
import SideStoreCore
import RoxasUIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
struct SourceError: LocalizedError {
enum Code {

View File

@@ -9,7 +9,10 @@
import Foundation
import SideStoreCore
import Intents
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
@available(iOS 14, *)
public final class IntentHandler: NSObject, RefreshAllIntentHandling {

View File

@@ -8,7 +8,10 @@
import Intents
import SideStoreCore
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
@available(iOS 14, *)
public class ViewAppIntentHandler: NSObject, ViewAppIntentHandling {

View File

@@ -9,7 +9,10 @@
import Foundation
import Network
import RoxasUIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import AltSign
import SideStoreCore

View File

@@ -8,7 +8,10 @@
import CoreData
import UIKit
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
import SideStoreCore
import EmotionalDamage

View File

@@ -10,7 +10,10 @@ import Foundation
import AltSign
import SideStoreCore
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
extension BackupAppOperation {
enum Action: String {

View File

@@ -13,7 +13,10 @@ import AltSign
import SideKit
import SideStoreCore
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
private extension DownloadAppOperation {
struct DependencyError: ALTLocalizedError {

View File

@@ -13,7 +13,10 @@ import SideStoreCore
import RoxasUIKit
import MiniMuxer
import minimuxer
import os.log
import OSLog
#if canImport(Logging)
import Logging
#endif
@objc(InstallAppOperation)
final class InstallAppOperation: ResultOperation<InstalledApp> {

View File

@@ -16,6 +16,8 @@ import AltSign
import SideStoreCore
import RoxasUIKit
import iMobileDevice
@available(iOS 14, *)
protocol PatchAppContext {
var bundleIdentifier: String { get }

Some files were not shown because too many files have changed in this diff Show More