From 232f5f5b9865f6c185de877872cee7038a1ddcc4 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Tue, 18 Jun 2019 18:32:49 -0700 Subject: [PATCH] [AltStore] Adds device UDID to Info.plist when refreshing AltStore --- AltStore/Operations/ResignAppOperation.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AltStore/Operations/ResignAppOperation.swift b/AltStore/Operations/ResignAppOperation.swift index 013ecead..5ab218a9 100644 --- a/AltStore/Operations/ResignAppOperation.swift +++ b/AltStore/Operations/ResignAppOperation.swift @@ -183,6 +183,7 @@ private extension ResignAppOperation let ipaURL = installedApp.ipaURL let bundleIdentifier = installedApp.bundleIdentifier let openURL = installedApp.openAppURL + let appIdentifier = installedApp.app.identifier DispatchQueue.global().async { do @@ -210,6 +211,12 @@ private extension ResignAppOperation infoDictionary[Bundle.Info.urlTypes] = allURLSchemes + if appIdentifier == App.altstoreAppID + { + guard let udid = Bundle.main.object(forInfoDictionaryKey: Bundle.Info.deviceID) as? String else { throw OperationError.unknownUDID } + infoDictionary[Bundle.Info.deviceID] = udid + } + try (infoDictionary as NSDictionary).write(to: bundle.infoPlistURL) completionHandler(.success(appBundleURL))