mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-13 16:53:29 +01:00
[AltServer] Supports enabling JIT on devices running iOS 17
AltServer embeds the AltJIT CLI tool in its app bundle and runs it as an admin subprocess.
This commit is contained in:
@@ -15,11 +15,17 @@ extension JITError
|
||||
typealias Error = JITError
|
||||
|
||||
case processNotRunning
|
||||
case dependencyNotFound
|
||||
}
|
||||
|
||||
static func processNotRunning(_ process: AppProcess, file: StaticString = #file, line: Int = #line) -> JITError {
|
||||
JITError(code: .processNotRunning, process: process, sourceFile: file, sourceLine: UInt(line))
|
||||
}
|
||||
|
||||
static func dependencyNotFound(_ dependency: String?, file: StaticString = #file, line: Int = #line) -> JITError {
|
||||
let errorFailure = NSLocalizedString("AltServer requires additional dependencies to enable JIT on iOS 17.", comment: "")
|
||||
return JITError(code: .dependencyNotFound, errorFailure: errorFailure, dependency: dependency, faq: "https://faq.altstore.io/how-to-use-altstore/altjit", sourceFile: file, sourceLine: UInt(line))
|
||||
}
|
||||
}
|
||||
|
||||
struct JITError: ALTLocalizedError
|
||||
@@ -31,6 +37,9 @@ struct JITError: ALTLocalizedError
|
||||
|
||||
@UserInfoValue var process: AppProcess?
|
||||
|
||||
@UserInfoValue var dependency: String?
|
||||
@UserInfoValue var faq: String? // Show user FAQ URL in AltStore error log.
|
||||
|
||||
var sourceFile: StaticString?
|
||||
var sourceLine: UInt?
|
||||
|
||||
@@ -40,6 +49,10 @@ struct JITError: ALTLocalizedError
|
||||
case .processNotRunning:
|
||||
let targetName = self.process?.description ?? NSLocalizedString("The target app", comment: "")
|
||||
return String(format: NSLocalizedString("%@ is not running.", comment: ""), targetName)
|
||||
|
||||
case .dependencyNotFound:
|
||||
let dependencyName = self.dependency.map { "'\($0)'" } ?? NSLocalizedString("A required dependency", comment: "")
|
||||
return String(format: NSLocalizedString("%@ is not installed.", comment: ""), dependencyName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +60,7 @@ struct JITError: ALTLocalizedError
|
||||
switch self.code
|
||||
{
|
||||
case .processNotRunning: return NSLocalizedString("Make sure the app is running in the foreground on your device then try again.", comment: "")
|
||||
case .dependencyNotFound: return NSLocalizedString("Please follow the instructions on the AltStore FAQ to install all required dependencies, then try again.", comment: "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user