mirror of
https://github.com/xtool-org/xtool.git
synced 2026-02-04 11:53:30 +01:00
30 lines
698 B
Swift
30 lines
698 B
Swift
//
|
|
// IPAInstaller.swift
|
|
// XKit
|
|
//
|
|
// Created by Kabir Oberai on 14/11/19.
|
|
// Copyright © 2019 Kabir Oberai. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftyMobileDevice
|
|
|
|
public final class IPAInstaller: Sendable {
|
|
|
|
private let client: InstallationProxyClient
|
|
public init(connection: Connection) async throws {
|
|
self.client = try await connection.startClient()
|
|
}
|
|
|
|
public func install(
|
|
uploaded: IPAUploader.UploadedIPA,
|
|
progress: @escaping @Sendable (InstallationProxyClient.RequestProgress) -> Void
|
|
) async throws {
|
|
try await client.install(
|
|
package: uploaded.location,
|
|
progress: progress
|
|
)
|
|
}
|
|
|
|
}
|