mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 19:53:25 +01:00
Fixes “invalid entitlements” when refreshing AltStore
Replaces “resigned” app group ID with “base” app group ID before resigning AltStore.
This commit is contained in:
@@ -362,7 +362,7 @@ extension FetchProvisioningProfilesOperation
|
|||||||
entitlements[key] = value
|
entitlements[key] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
let applicationGroups = entitlements[.appGroups] as? [String] ?? []
|
var applicationGroups = entitlements[.appGroups] as? [String] ?? []
|
||||||
if applicationGroups.isEmpty
|
if applicationGroups.isEmpty
|
||||||
{
|
{
|
||||||
guard let isAppGroupsEnabled = appID.features[.appGroups] as? Bool, isAppGroupsEnabled else {
|
guard let isAppGroupsEnabled = appID.features[.appGroups] as? Bool, isAppGroupsEnabled else {
|
||||||
@@ -374,6 +374,22 @@ extension FetchProvisioningProfilesOperation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if app.bundleIdentifier == StoreApp.altstoreAppID
|
||||||
|
{
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
applicationGroups.append(Bundle.baseAltStoreAppGroupID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Dispatch onto global queue to prevent appGroupsLock deadlock.
|
// Dispatch onto global queue to prevent appGroupsLock deadlock.
|
||||||
DispatchQueue.global().async {
|
DispatchQueue.global().async {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user