From 4278e7db2b1222b02958f99ebc11b15a70759952 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 22 Nov 2022 13:20:14 -0600 Subject: [PATCH] [AltServer] Fixes installation alerts not using device name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As of iOS 16, iOS apps can no longer read the device name. This means devices registered with AltStore (not AltServer) have generic names, so we should prefer using the name of provided ALTDevice rather than the name of device returned from server to ensure it’s correct. --- AltServer/Devices/ALTDeviceManager+Installation.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AltServer/Devices/ALTDeviceManager+Installation.swift b/AltServer/Devices/ALTDeviceManager+Installation.swift index e772655e..b2af4ef0 100644 --- a/AltServer/Devices/ALTDeviceManager+Installation.swift +++ b/AltServer/Devices/ALTDeviceManager+Installation.swift @@ -167,7 +167,7 @@ extension ALTDeviceManager if ipaFileURL == nil { // Show alert before downloading remote .ipa. - self.showInstallationAlert(appName: NSLocalizedString("AltStore", comment: ""), deviceName: device.name) + self.showInstallationAlert(appName: NSLocalizedString("AltStore", comment: ""), deviceName: altDevice.name) } self.prepare(device) { (result) in @@ -191,7 +191,7 @@ extension ALTDeviceManager if ipaFileURL != nil { // Show alert after "downloading" local .ipa. - self.showInstallationAlert(appName: application.name, deviceName: device.name) + self.showInstallationAlert(appName: application.name, deviceName: altDevice.name) } appName = application.name