Supports installing/refreshings apps w/o computer on jailbroken devices

AltStore will use AltDaemon as a local AltServer if it’s installed and running. AltStore remains a regular sandboxed app, but AltDaemon has private entitlements necessary to perform AltServer operations without a computer.
This commit is contained in:
Riley Testut
2020-06-04 19:53:10 -07:00
parent cb4656722a
commit 496aca642c
6 changed files with 131 additions and 78 deletions

View File

@@ -10,22 +10,6 @@ import Network
import AltKit
extension ALTServerError
{
init<E: Error>(_ error: E)
{
switch error
{
case let error as ALTServerError: self = error
case is DecodingError: self = ALTServerError(.invalidResponse)
case is EncodingError: self = ALTServerError(.invalidRequest)
default:
assertionFailure("Caught unknown error type")
self = ALTServerError(.unknown)
}
}
}
enum ConnectionError: LocalizedError
{
case serverNotFound
@@ -42,13 +26,23 @@ enum ConnectionError: LocalizedError
}
}
extension Server
{
enum ConnectionType
{
case wireless
case wired
case local
}
}
struct Server: Equatable
{
var identifier: String? = nil
var service: NetService? = nil
var isPreferred = false
var isWiredConnection = false
var connectionType: ConnectionType = .wireless
}
extension Server