Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Comment thread
coderabbitai[bot] marked this conversation as resolved.
)
]
)
}
}

extension AssociatedDomainsEntitlement: EntitlementWithCapability {
var capability: DeveloperServicesCapability {
DeveloperServicesCapability(.associatedDomains, isFree: false)
Expand Down
16 changes: 16 additions & 0 deletions Sources/XKit/Model/Entitlements/EntitlementTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extension EntitlementContainer {
WiFiAwareEntitlement.self,
HomeKitEntitlement.self,
HealthKitEntitlement.self,
AppleSignInEntitlement.self,
]
}

Expand Down Expand Up @@ -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"

Expand Down
Loading