Fixes “App Group does not exist” error

This commit is contained in:
Riley Testut
2021-02-01 16:53:51 -06:00
parent 8889923111
commit 7cfcab312c

View File

@@ -365,17 +365,11 @@ extension FetchProvisioningProfilesOperation
entitlements[key] = value entitlements[key] = value
} }
var applicationGroups = entitlements[.appGroups] as? [String] ?? [] guard var applicationGroups = entitlements[.appGroups] as? [String], !applicationGroups.isEmpty else {
if applicationGroups.isEmpty // Assigning an App ID to an empty app group array fails,
{ // so just do nothing if there are no app groups.
guard let isAppGroupsEnabled = appID.features[.appGroups] as? Bool, isAppGroupsEnabled else {
// No app groups, and we also haven't enabled the feature, so don't continue.
// For apps with no app groups but have had the feature enabled already
// we'll continue and assign the app ID to an empty array
// in case we need to explicitly remove them.
return completionHandler(.success(appID)) return completionHandler(.success(appID))
} }
}
if app.isAltStoreApp if app.isAltStoreApp
{ {