Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, macOS.
entitlements: support Sign in with Apple (#377)
Víctor Agudo Gonzalez952a7ffd4351
diff --git a/Sources/XKit/DeveloperServices/App IDs/Entitlements/DeveloperServicesCapability.swift b/Sources/XKit/DeveloperServices/App IDs/Entitlements/DeveloperServicesCapability.swiftindex 2dca463..1d12254 100644--- a/Sources/XKit/DeveloperServices/App IDs/Entitlements/DeveloperServicesCapability.swift+++ b/Sources/XKit/DeveloperServices/App IDs/Entitlements/DeveloperServicesCapability.swift@@ -79,6 +79,22 @@ extension AppGroupEntitlement: EntitlementWithCapability {}}+extension AppleSignInEntitlement: EntitlementWithCapability {+ var capability: DeveloperServicesCapability {+ // A primary App ID: the app is its own Sign in with Apple group.+ DeveloperServicesCapability(+ .appleIdAuth,+ isFree: false,+ settings: [+ .init(+ key: .init(.appleIdAuthAppConsent),+ options: [.init(key: .init(.primaryAppConsent))]+ )+ ]+ )+ }+}+extension AssociatedDomainsEntitlement: EntitlementWithCapability {var capability: DeveloperServicesCapability {DeveloperServicesCapability(.associatedDomains, isFree: false)diff --git a/Sources/XKit/Model/Entitlements/EntitlementTypes.swift b/Sources/XKit/Model/Entitlements/EntitlementTypes.swiftindex 1d65a04..7bc1ea5 100644--- a/Sources/XKit/Model/Entitlements/EntitlementTypes.swift+++ b/Sources/XKit/Model/Entitlements/EntitlementTypes.swift@@ -29,6 +29,7 @@ extension EntitlementContainer {WiFiAwareEntitlement.self,HomeKitEntitlement.self,HealthKitEntitlement.self,+ AppleSignInEntitlement.self,]}@@ -99,6 +100,21 @@ public struct AssociatedDomainsEntitlement: Entitlement, RawRepresentable {}}+public struct AppleSignInEntitlement: Entitlement, RawRepresentable {+ public static let identifier = "com.apple.developer.applesignin"++ public var rawValue: [String]+ public init(rawValue: [String]) { self.rawValue = rawValue }++ public init(from decoder: Decoder) throws {+ rawValue = try decoder.singleValueContainer().decode([String].self)+ }+ public func encode(to encoder: Encoder) throws {+ var container = encoder.singleValueContainer()+ try container.encode(rawValue)+ }+}+public enum APSEnvironmentEntitlement: String, Entitlement {public static let identifier = "aps-environment"