[AltStore] Adds device UDID to Info.plist when refreshing AltStore

This commit is contained in:
Riley Testut
2019-06-18 18:32:49 -07:00
parent 9d3eda9526
commit 232f5f5b98

View File

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