From 7536b09c4a233d0bf00dc994a0a1975dc289c7fc Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Fri, 13 Sep 2019 14:48:01 -0700 Subject: [PATCH] [AltServer] Deletes downloaded AltStore.ipa after installing to device --- AltServer/Devices/ALTDeviceManager+Installation.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/AltServer/Devices/ALTDeviceManager+Installation.swift b/AltServer/Devices/ALTDeviceManager+Installation.swift index 3f487e3d..95561a91 100644 --- a/AltServer/Devices/ALTDeviceManager+Installation.swift +++ b/AltServer/Devices/ALTDeviceManager+Installation.swift @@ -84,6 +84,15 @@ extension ALTDeviceManager let appBundleURL = try FileManager.default.unzipAppBundle(at: fileURL, toDirectory: destinationDirectoryURL) + do + { + try FileManager.default.removeItem(at: fileURL) + } + catch + { + print("Failed to remove downloaded .ipa.", error) + } + guard let application = ALTApplication(fileURL: appBundleURL) else { throw ALTError(.invalidApp) } self.registerAppID(name: "AltStore", identifier: "com.rileytestut.AltStore", team: team) { (result) in