mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-16 12:30:29 +00:00
Eliminates all continued background processing logic and related settings, including the ContinuedProcessingManager and its usage. Adds Picture in Picture (PiP) support for script execution using the Pipify package, updates settings and UI to reflect PiP instead of continued processing, and refactors related code paths to use PiP for script execution feedback.
29 lines
956 B
Swift
29 lines
956 B
Swift
//
|
|
// Extensions.swift
|
|
// StikDebug
|
|
//
|
|
// Created by s s on 2025/7/9.
|
|
//
|
|
import UniformTypeIdentifiers
|
|
|
|
extension FileManager {
|
|
func filePath(atPath path: String, withLength length: Int) -> String? {
|
|
guard let file = try? contentsOfDirectory(atPath: path).filter({ $0.count == length }).first else { return nil }
|
|
return "\(path)/\(file)"
|
|
}
|
|
}
|
|
|
|
extension UIDocumentPickerViewController {
|
|
@objc func fix_init(forOpeningContentTypes contentTypes: [UTType], asCopy: Bool) -> UIDocumentPickerViewController {
|
|
return fix_init(forOpeningContentTypes: contentTypes, asCopy: true)
|
|
}
|
|
}
|
|
|
|
extension UserDefaults {
|
|
enum Keys {
|
|
/// Forces the app to treat the current device as TXM-capable so scripts always run.
|
|
static let txmOverride = "overrideTXMForScripts"
|
|
/// Tracks whether an external device profile is currently active.
|
|
static let usingExternalDevice = "UsingExternalDevice"
|
|
}
|
|
}
|