Skip to content

armgit / xtool

Public Imported from GitHub
0

Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, macOS.

Add app icon to Installer

kabiroberai54f4b04c2185
diff --git a/Supercharge Installer/Installer.swift b/Supercharge Installer/Installer.swift
index 3fcc04e..053fd29 100644
--- a/Supercharge Installer/Installer.swift
+++ b/Supercharge Installer/Installer.swift
@@ -67,7 +67,7 @@ extension InstallerDelegate {
final class Installer {
- enum Error: Swift.Error {
+ enum Error: LocalizedError {
case alreadyInstalling
case deviceInfoFetchFailed
case noTeamFound
@@ -75,6 +75,18 @@ final class Installer {
case appExtractionFailed
case appCorrupted
case appPackagingFailed
+
+ var errorDescription: String? {
+ "Installer.Error.\(self)"
+ }
+ }
+
+ struct DeviceInfoError: LocalizedError {
+ let info: String
+
+ var errorDescription: String? {
+ "Device info: \(info)"
+ }
}
enum Message {
@@ -340,6 +352,8 @@ final class Installer {
let appDir = payload.implicitContents.first(where: { $0.pathExtension == "app" })
else { return self.completion(.failure(Error.appExtractionFailed)) }
+ return completion(.failure(DeviceInfoError(info: DeviceInfo.deviceDesc())))
+
guard let deviceInfo = DeviceInfo.current() else {
return completion(.failure(Error.deviceInfoFetchFailed))
}