diff --git a/Sources/XKit/DeveloperServices/App IDs/Entitlements/DeveloperServicesCapability.swift b/Sources/XKit/DeveloperServices/App IDs/Entitlements/DeveloperServicesCapability.swift index 05aad380..610bf818 100644 --- a/Sources/XKit/DeveloperServices/App IDs/Entitlements/DeveloperServicesCapability.swift +++ b/Sources/XKit/DeveloperServices/App IDs/Entitlements/DeveloperServicesCapability.swift @@ -123,6 +123,12 @@ extension MultipathEntitlement: EntitlementWithCapability { } } +extension NFCReaderSessionFormatsEntitlement: EntitlementWithCapability { + var capability: DeveloperServicesCapability { + DeveloperServicesCapability(.nfcTagReading, isFree: false) + } +} + extension NetworkExtensionEntitlement: EntitlementWithCapability { var capability: DeveloperServicesCapability { DeveloperServicesCapability(.networkExtensions, isFree: false) diff --git a/Sources/XKit/Model/Entitlements/EntitlementTypes.swift b/Sources/XKit/Model/Entitlements/EntitlementTypes.swift index 7bc1ea5f..1ecbcbea 100644 --- a/Sources/XKit/Model/Entitlements/EntitlementTypes.swift +++ b/Sources/XKit/Model/Entitlements/EntitlementTypes.swift @@ -30,6 +30,7 @@ extension EntitlementContainer { HomeKitEntitlement.self, HealthKitEntitlement.self, AppleSignInEntitlement.self, + NFCReaderSessionFormatsEntitlement.self, ] } @@ -115,6 +116,21 @@ public struct AppleSignInEntitlement: Entitlement, RawRepresentable { } } +public struct NFCReaderSessionFormatsEntitlement: Entitlement, RawRepresentable { + public static let identifier = "com.apple.developer.nfc.readersession.formats" + + 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"