From 197c3b3338037cddc292231a43086ad1e89fc55b Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Mon, 30 Mar 2020 15:06:16 -0700 Subject: [PATCH] [AltServer] Fixes installing outdated profile after app installation --- AltServer/Devices/ALTDeviceManager.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/AltServer/Devices/ALTDeviceManager.mm b/AltServer/Devices/ALTDeviceManager.mm index 851626b0..8d17568e 100644 --- a/AltServer/Devices/ALTDeviceManager.mm +++ b/AltServer/Devices/ALTDeviceManager.mm @@ -115,6 +115,15 @@ NSNotificationName const ALTDeviceManagerDeviceDidDisconnectNotification = @"ALT } [cachedProfiles enumerateKeysAndObjectsUsingBlock:^(NSString *bundleID, ALTProvisioningProfile *profile, BOOL * _Nonnull stop) { + for (ALTProvisioningProfile *installedProfile in installedProfiles) + { + if ([installedProfile.bundleIdentifier isEqualToString:profile.bundleIdentifier]) + { + // Don't reinstall cached profile because it was installed with the app. + return; + } + } + NSError *installError = nil; if (![self installProvisioningProfile:profile misagent:mis error:&installError]) {