From 48c49c6ec74ff67d7c7df25e250ceeb04c652664 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 29 Mar 2022 19:34:47 -0700 Subject: [PATCH] [AltServer] Embeds ALTServerID in Info.plist if app uses AltKit --- AltServer/Devices/ALTDeviceManager+Installation.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AltServer/Devices/ALTDeviceManager+Installation.swift b/AltServer/Devices/ALTDeviceManager+Installation.swift index 064c35d0..47f38af3 100644 --- a/AltServer/Devices/ALTDeviceManager+Installation.swift +++ b/AltServer/Devices/ALTDeviceManager+Installation.swift @@ -841,6 +841,12 @@ private extension ALTDeviceManager try encryptedData.write(to: certificateURL, options: .atomic) } } + else if infoDictionary.keys.contains(Bundle.Info.deviceID) + { + // There is an ALTDeviceID entry, so assume the app is using AltKit and replace it with the device's UDID. + additionalValues[Bundle.Info.deviceID] = device.identifier + additionalValues[Bundle.Info.serverID] = UserDefaults.standard.serverID + } try prepare(appBundle, additionalInfoDictionaryValues: additionalValues)