From 8a97c409facda05aa676527b8cc2021fa5438ffb Mon Sep 17 00:00:00 2001 From: naturecodevoid <44983869+naturecodevoid@users.noreply.github.com> Date: Wed, 12 Apr 2023 07:46:14 -0700 Subject: [PATCH] fix: add .AltWidget to app group ID when modifying for SideStore --- .../FetchProvisioningProfilesOperation.swift | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/AltStore/Operations/FetchProvisioningProfilesOperation.swift b/AltStore/Operations/FetchProvisioningProfilesOperation.swift index 955282f4..2782a467 100644 --- a/AltStore/Operations/FetchProvisioningProfilesOperation.swift +++ b/AltStore/Operations/FetchProvisioningProfilesOperation.swift @@ -394,17 +394,26 @@ extension FetchProvisioningProfilesOperation } } + // Make sure we add .AltWidget for the widget + var altStoreAppGroupID = Bundle.baseAltStoreAppGroupID + for (_, group) in applicationGroups.enumerated() { + if group.contains("AltWidget") { + altStoreAppGroupID += ".AltWidget" + break + } + } + // Potentially updating app groups for this specific AltStore. // Find the (unique) AltStore app group, then replace it // with the correct "base" app group ID. // Otherwise, we may append a duplicate team identifier to the end. if let index = applicationGroups.firstIndex(where: { $0.contains(Bundle.baseAltStoreAppGroupID) }) { - applicationGroups[index] = Bundle.baseAltStoreAppGroupID + applicationGroups[index] = altStoreAppGroupID } else { - applicationGroups.append(Bundle.baseAltStoreAppGroupID) + applicationGroups.append(altStoreAppGroupID) } } print("Application groups: \(applicationGroups)")