Fix App ID capabilities on paid accounts

This commit is contained in:
Kabir Oberai
2025-05-12 17:59:18 +05:30
Unverified
parent 4f5cc87eee
commit de09bb99eb
@@ -104,9 +104,13 @@ public struct DeveloperServicesAddAppOperation: DeveloperServicesOperation {
.ok
}
} else {
_ = try await context.developerAPIClient
.bundleIdCapabilitiesDeleteInstance(path: .init(id: cap.id))
.noContent
// DeveloperServices doesn't allow deleting these capabilities
let requiredCapabilities: Set<Components.Schemas.CapabilityType> = [.inAppPurchase]
if let capType = cap.attributes?.capabilityType, !requiredCapabilities.contains(capType) {
_ = try await context.developerAPIClient
.bundleIdCapabilitiesDeleteInstance(path: .init(id: cap.id))
.noContent
}
}
}
for (typ, settings) in wantedCapabilities {