[AltServer] Fixes installation alerts not using device name

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.
This commit is contained in:
Riley Testut
2022-11-22 13:20:14 -06:00
parent d5f4f4c625
commit 4278e7db2b

View File

@@ -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