diff --git a/AltServer/Devices/ALTDeviceManager+Installation.swift b/AltServer/Devices/ALTDeviceManager+Installation.swift index a0c70667..74fbe3ab 100644 --- a/AltServer/Devices/ALTDeviceManager+Installation.swift +++ b/AltServer/Devices/ALTDeviceManager+Installation.swift @@ -629,8 +629,14 @@ private extension ALTDeviceManager if let applicationGroups = app.entitlements[.appGroups] as? [String], !applicationGroups.isEmpty { + // App uses app groups, so assign `true` to enable the feature. features[.appGroups] = true } + else + { + // App has no app groups, so assign `false` to disable the feature. + features[.appGroups] = false + } var updateFeatures = false @@ -642,6 +648,11 @@ private extension ALTDeviceManager // AppID already has this feature enabled and the values are the same. continue } + else if appID.features[feature] == nil, let shouldEnableFeature = value as? Bool, !shouldEnableFeature + { + // AppID doesn't already have this feature enabled, but we want it disabled anyway. + continue + } else { // AppID either doesn't have this feature enabled or the value has changed, diff --git a/AltStore/Operations/FetchProvisioningProfilesOperation.swift b/AltStore/Operations/FetchProvisioningProfilesOperation.swift index 2a342dd3..d4f9bd8e 100644 --- a/AltStore/Operations/FetchProvisioningProfilesOperation.swift +++ b/AltStore/Operations/FetchProvisioningProfilesOperation.swift @@ -320,8 +320,14 @@ extension FetchProvisioningProfilesOperation if let applicationGroups = entitlements[.appGroups] as? [String], !applicationGroups.isEmpty { + // App uses app groups, so assign `true` to enable the feature. features[.appGroups] = true } + else + { + // App has no app groups, so assign `false` to disable the feature. + features[.appGroups] = false + } var updateFeatures = false @@ -333,6 +339,11 @@ extension FetchProvisioningProfilesOperation // AppID already has this feature enabled and the values are the same. continue } + else if appID.features[feature] == nil, let shouldEnableFeature = value as? Bool, !shouldEnableFeature + { + // AppID doesn't already have this feature enabled, but we want it disabled anyway. + continue + } else { // AppID either doesn't have this feature enabled or the value has changed,