The Swift Package Index logo.Swift Package Index

Build Information

Failed to build HealthKitToFhir, reference master (3193ec), with Swift 6.2 for macOS (SPM) on 18 Jun 2025 21:58:43 UTC.

Build Command

env DEVELOPER_DIR=/Applications/Xcode-26.0.0-Beta.app xcrun swift build --arch arm64

Build Log

========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/microsoft/healthkit-to-fhir.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/microsoft/healthkit-to-fhir
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at 3193ec9 Fixed issue with OS Version (#6)
Cloned https://github.com/microsoft/healthkit-to-fhir.git
Revision (git rev-parse @):
3193ec9772d21a0e7df3a917b8a7ed1d541ea20f
SUCCESS checkout https://github.com/microsoft/healthkit-to-fhir.git at master
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.2
Building package at path:  $PWD
https://github.com/microsoft/healthkit-to-fhir.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-26.0.0-Beta.app xcrun swift build --arch arm64
Building for debugging...
[0/5] Write sources
[4/5] Write swift-version-1EA4D86E10B52AF.txt
[6/197] Emitting module Models
[7/218] Compiling Models MedicinalProductIngredient.swift
[8/218] Compiling Models MedicinalProductInteraction.swift
[9/218] Compiling Models MedicinalProductManufactured.swift
[10/218] Compiling Models MedicinalProductPackaged.swift
[11/218] Compiling Models MedicinalProductPharmaceutical.swift
[12/218] Compiling Models MedicinalProductUndesirableEffect.swift
[13/218] Compiling Models MessageDefinition.swift
[14/218] Compiling Models MessageHeader.swift
[15/218] Compiling Models Meta.swift
[16/218] Compiling Models MetadataResource.swift
[17/218] Compiling Models MolecularSequence.swift
[18/218] Compiling Models Money.swift
[19/218] Compiling Models NamingSystem.swift
[20/218] Compiling Models Narrative.swift
[21/218] Compiling Models NutritionOrder.swift
[22/218] Compiling Models Observation.swift
[23/218] Compiling Models ObservationDefinition.swift
[24/218] Compiling Models OperationDefinition.swift
[25/218] Compiling Models OperationOutcome.swift
[26/218] Compiling Models Organization.swift
[27/218] Compiling Models OrganizationAffiliation.swift
[28/218] Compiling Models ImplementationGuide.swift
[29/218] Compiling Models InsurancePlan.swift
[30/218] Compiling Models Invoice.swift
[31/218] Compiling Models Library.swift
[32/218] Compiling Models Linkage.swift
[33/218] Compiling Models List.swift
[34/218] Compiling Models Location.swift
[35/218] Compiling Models MarketingStatus.swift
[36/218] Compiling Models Measure.swift
[37/218] Compiling Models MeasureReport.swift
[38/218] Compiling Models Media.swift
[39/218] Compiling Models Medication.swift
[40/218] Compiling Models MedicationAdministration.swift
[41/218] Compiling Models MedicationDispense.swift
[42/218] Compiling Models MedicationKnowledge.swift
[43/218] Compiling Models MedicationRequest.swift
[44/218] Compiling Models MedicationStatement.swift
[45/218] Compiling Models MedicinalProduct.swift
[46/218] Compiling Models MedicinalProductAuthorization.swift
[47/218] Compiling Models MedicinalProductContraindication.swift
[48/218] Compiling Models MedicinalProductIndication.swift
[49/218] Compiling Models RelatedArtifact.swift
[50/218] Compiling Models RelatedPerson.swift
[51/218] Compiling Models RequestGroup.swift
[52/218] Compiling Models ResearchDefinition.swift
[53/218] Compiling Models ResearchElementDefinition.swift
[54/218] Compiling Models ResearchStudy.swift
[55/218] Compiling Models ResearchSubject.swift
[56/218] Compiling Models Resource+Meta.swift
[57/218] Compiling Models Resource.swift
[58/218] Compiling Models RiskAssessment.swift
[59/218] Compiling Models RiskEvidenceSynthesis.swift
[60/218] Compiling Models SampledData.swift
[61/218] Compiling Models Schedule.swift
[62/218] Compiling Models SearchParameter.swift
[63/218] Compiling Models ServiceRequest.swift
[64/218] Compiling Models Signature.swift
[65/218] Compiling Models Slot.swift
[66/218] Compiling Models Specimen.swift
[67/218] Compiling Models SpecimenDefinition.swift
[68/218] Compiling Models StructureDefinition.swift
[69/218] Compiling Models StructureMap.swift
[70/218] Compiling Models FHIRRequest.swift
[71/218] Compiling Models FHIRRequestHandler.swift
[72/218] Compiling Models FHIRServer.swift
[73/218] Compiling Models FHIRServerResponse.swift
[74/218] Compiling Models FHIRString.swift
[75/218] Compiling Models FHIRType.swift
[76/218] Compiling Models FHIRURL.swift
[77/218] Compiling Models FHIRValidationError.swift
[78/218] Compiling Models FamilyMemberHistory.swift
[79/218] Compiling Models Flag.swift
[80/218] Compiling Models Goal.swift
[81/218] Compiling Models GraphDefinition.swift
[82/218] Compiling Models Group.swift
[83/218] Compiling Models GuidanceResponse.swift
[84/218] Compiling Models HealthcareService.swift
[85/218] Compiling Models HumanName.swift
[86/218] Compiling Models Identifier.swift
[87/218] Compiling Models ImagingStudy.swift
[88/218] Compiling Models Immunization.swift
[89/218] Compiling Models ImmunizationEvaluation.swift
[90/218] Compiling Models ImmunizationRecommendation.swift
[91/218] Compiling Models Account.swift
[92/218] Compiling Models ActivityDefinition.swift
[93/218] Compiling Models Address.swift
[94/218] Compiling Models AdverseEvent.swift
[95/218] Compiling Models Age.swift
[96/218] Compiling Models AllergyIntolerance.swift
[97/218] Compiling Models Annotation.swift
[98/218] Compiling Models Appointment.swift
[99/218] Compiling Models AppointmentResponse.swift
[100/218] Compiling Models Attachment.swift
[101/218] Compiling Models AuditEvent.swift
[102/218] Compiling Models BackboneElement.swift
[103/218] Compiling Models Base64Binary.swift
[104/218] Compiling Models Basic.swift
[105/218] Compiling Models Binary.swift
[106/218] Compiling Models BiologicallyDerivedProduct.swift
[107/218] Compiling Models BodyStructure.swift
[108/218] Compiling Models Bundle.swift
[109/218] Compiling Models CapabilityStatement.swift
[110/218] Compiling Models CarePlan.swift
[111/218] Compiling Models CareTeam.swift
[112/218] Compiling Models CatalogEntry.swift
[113/218] Compiling Models CoverageEligibilityRequest.swift
[114/218] Compiling Models CoverageEligibilityResponse.swift
[115/218] Compiling Models DataRequirement.swift
[116/218] Compiling Models DateAndTime.swift
[117/218] Compiling Models DetectedIssue.swift
[118/218] Compiling Models Device.swift
[119/218] Compiling Models DeviceDefinition.swift
[120/218] Compiling Models DeviceMetric.swift
[121/218] Compiling Models DeviceRequest.swift
[122/218] Compiling Models DeviceUseStatement.swift
[123/218] Compiling Models DiagnosticReport.swift
[124/218] Compiling Models Distance.swift
[125/218] Compiling Models DocumentManifest.swift
[126/218] Compiling Models DocumentReference.swift
[127/218] Compiling Models DomainResource.swift
[128/218] Compiling Models Dosage.swift
[129/218] Compiling Models Duration.swift
[130/218] Compiling Models EffectEvidenceSynthesis.swift
[131/218] Compiling Models Element.swift
[132/218] Compiling Models ElementDefinition.swift
[133/218] Compiling Models Encounter.swift
[134/218] Compiling Models ParameterDefinition.swift
[135/218] Compiling Models Parameters.swift
[136/218] Compiling Models Patient.swift
[137/218] Compiling Models PaymentNotice.swift
[138/218] Compiling Models PaymentReconciliation.swift
[139/218] Compiling Models Period.swift
[140/218] Compiling Models Person.swift
[141/218] Compiling Models PlanDefinition.swift
[142/218] Compiling Models Population.swift
[143/218] Compiling Models Practitioner.swift
[144/218] Compiling Models PractitionerRole.swift
[145/218] Compiling Models Procedure.swift
[146/218] Compiling Models ProdCharacteristic.swift
[147/218] Compiling Models ProductShelfLife.swift
[148/218] Compiling Models Provenance.swift
[149/218] Compiling Models Quantity.swift
[150/218] Compiling Models Questionnaire.swift
[151/218] Compiling Models QuestionnaireResponse.swift
[152/218] Compiling Models Range.swift
[153/218] Compiling Models Ratio.swift
[154/218] Compiling Models Reference.swift
[155/218] Compiling Models Endpoint.swift
[156/218] Compiling Models EnrollmentRequest.swift
[157/218] Compiling Models EnrollmentResponse.swift
[158/218] Compiling Models EpisodeOfCare.swift
[159/218] Compiling Models EventDefinition.swift
[160/218] Compiling Models Evidence.swift
[161/218] Compiling Models EvidenceVariable.swift
[162/218] Compiling Models ExampleScenario.swift
[163/218] Compiling Models ExplanationOfBenefit.swift
[164/218] Compiling Models Expression.swift
[165/218] Compiling Models Extension.swift
[166/218] Compiling Models FHIRAbstractBase+Factory.swift
[167/218] Compiling Models FHIRAbstractBase.swift
[168/218] Compiling Models FHIRAbstractResource.swift
[169/218] Compiling Models FHIRBool.swift
[170/218] Compiling Models FHIRCanonical.swift
[171/218] Compiling Models FHIRDecimal.swift
[172/218] Compiling Models FHIREnum.swift
[173/218] Compiling Models FHIRError.swift
[174/218] Compiling Models FHIRInteger.swift
[175/218] Compiling Models FHIRPrimitive.swift
[176/218] Compiling Models ChargeItem.swift
[177/218] Compiling Models ChargeItemDefinition.swift
[178/218] Compiling Models Claim.swift
[179/218] Compiling Models ClaimResponse.swift
[180/218] Compiling Models ClinicalImpression.swift
[181/218] Compiling Models CodeSystem.swift
[182/218] Compiling Models CodeSystems.swift
[183/218] Compiling Models CodeableConcept.swift
[184/218] Compiling Models Coding.swift
[185/218] Compiling Models Communication.swift
[186/218] Compiling Models CommunicationRequest.swift
[187/218] Compiling Models CompartmentDefinition.swift
[188/218] Compiling Models Composition.swift
[189/218] Compiling Models ConceptMap.swift
[190/218] Compiling Models Condition.swift
[191/218] Compiling Models Consent.swift
[192/218] Compiling Models ContactDetail.swift
[193/218] Compiling Models ContactPoint.swift
[194/218] Compiling Models Contract.swift
[195/218] Compiling Models Contributor.swift
[196/218] Compiling Models Count.swift
[197/218] Compiling Models Coverage.swift
[198/218] Compiling Models Subscription.swift
[199/218] Compiling Models Substance.swift
[200/218] Compiling Models SubstanceAmount.swift
[201/218] Compiling Models SubstanceNucleicAcid.swift
[202/218] Compiling Models SubstancePolymer.swift
[203/218] Compiling Models SubstanceProtein.swift
[204/218] Compiling Models SubstanceReferenceInformation.swift
[205/218] Compiling Models SubstanceSourceMaterial.swift
[206/218] Compiling Models SubstanceSpecification.swift
[207/218] Compiling Models SupplyDelivery.swift
[208/218] Compiling Models SupplyRequest.swift
[209/218] Compiling Models Task.swift
[210/218] Compiling Models TerminologyCapabilities.swift
[211/218] Compiling Models TestReport.swift
[212/218] Compiling Models TestScript.swift
[213/218] Compiling Models Timing.swift
[214/218] Compiling Models TriggerDefinition.swift
[215/218] Compiling Models UsageContext.swift
[216/218] Compiling Models ValueSet.swift
[217/218] Compiling Models VerificationResult.swift
[218/218] Compiling Models VisionPrescription.swift
[219/235] Compiling Client Resource+Operation.swift
[220/235] Compiling Client Resource+REST.swift
[221/236] Compiling Client Reference+Resolving.swift
[222/236] Compiling Client Resource+Instantiation.swift
[223/236] Compiling Client FHIRCanonical+Resolving.swift
[224/236] Compiling Client FHIRMinimalServer.swift
[225/236] Compiling Client FHIRString+Localization.swift
[226/236] Compiling Client Patient+SMART.swift
[227/236] Compiling Client FHIROpenServer.swift
[228/236] Compiling Client FHIROperation.swift
[229/236] Compiling Client DomainResource+Containment.swift
[230/236] Compiling Client Element+Extensions.swift
[231/236] Compiling Client FHIRSearch.swift
[232/236] Compiling Client FHIRServerDataResponse.swift
[233/236] Emitting module Client
[234/236] Compiling Client FHIRBaseRequestHandler.swift
[235/236] Compiling Client FHIRBaseServer.swift
[236/236] Compiling Client ValueSet+Localization.swift
[237/238] Emitting module FHIR
[238/238] Compiling FHIR SwiftFHIR.swift
[239/247] Compiling HealthKitToFhir FactoryBase.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[240/247] Compiling HealthKitToFhir ConversionError.swift
[241/247] Compiling HealthKitToFhir ConfigurationError.swift
[242/247] Compiling HealthKitToFhir Configurations.swift
[243/247] Compiling HealthKitToFhir ResourceFactoryProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ResourceFactoryProtocol.swift:24:35: error: 'HKObject' is only available in macOS 13.0 or newer
10 | import FHIR
11 |
12 | public protocol ResourceFactoryProtocol {
   |                 `- note: add @available attribute to enclosing protocol
13 |
14 |     /// The Apple Health App bundle id used as the identifier system key when creating resources
   :
22 |     ///   - ConversionError: Will throw if a required value is not mapped properly in the config, the type is not supported, or the factory cannot handle the given resource.
23 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
24 |     func resource<T>(from object: HKObject) throws -> T
   |          |                        `- error: 'HKObject' is only available in macOS 13.0 or newer
   |          `- note: add @available attribute to enclosing instance method
25 | }
26 |
[244/247] Compiling HealthKitToFhir Constants.swift
[245/247] Emitting module HealthKitToFhir
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:15:42: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    |                 |                        `- error: 'HKObject' is only available in macOS 13.0 or newer
    |                 `- note: add @available attribute to enclosing instance method
 16 |         guard T.self is Device.Type else {
 17 |             throw ConversionError.incorrectTypeForFactory
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:23:35: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 21 |     }
 22 |
 23 |     open func device(from object: HKObject) throws -> Device {
    |               |                   `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 24 |         let device = Device()
 25 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:63:62: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 61 |     ///   - device: The Device object that the UDI should be added to.
 62 |     ///   - object: The HKObject.
 63 |     open func addUdiDeviceIdentifier(device: Device, object: HKObject) {
    |               |                                              `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 64 |         var udiCarrier = device.udiCarrier ?? [DeviceUdiCarrier]()
 65 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:81:51: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               |                                   `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:116:48: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
114 |     ///   - device: The Device object that the name information should be added to.
115 |     ///   - object: The HKObject.
116 |     open func addNames(device: Device, object: HKObject) {
    |               |                                `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
117 |         var deviceNames = device.deviceName ?? [DeviceDeviceName]()
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:29:42: error: 'HKObject' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 27 |     }
 28 |
 29 |     public func resource<T>(from object: HKObject) throws -> T {
    |                 |                        `- error: 'HKObject' is only available in macOS 13.0 or newer
    |                 `- note: add @available attribute to enclosing instance method
 30 |         guard T.self is Observation.Type else {
 31 |             throw ConversionError.incorrectTypeForFactory
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:44:40: error: 'HKObject' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 42 |     ///   - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
 43 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
 44 |     open func observation(from object: HKObject) throws -> Observation {
    |               |                        `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 45 |         guard let sample = object as? HKSample else {
 46 |             // The given type is not currently supported.
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:87:43: error: 'HKObjectType' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 85 |     ///   - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
 86 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
 87 |     open func codeableConcept(objectType: HKObjectType) throws -> CodeableConcept {
    |               |                           `- error: 'HKObjectType' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 88 |         guard let conversionValues = conversionMap[objectType.identifier] else {
 89 |             throw ConversionError.conversionNotDefinedForType(identifier: objectType.identifier)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:106:45: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
104 |     ///   - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
105 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
106 |     open func valueQuantity(quantitySample: HKQuantitySample) throws -> Quantity {
    |               |                             `- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
107 |         guard let conversionValues = conversionMap[quantitySample.quantityType.identifier] else {
108 |             throw ConversionError.conversionNotDefinedForType(identifier: quantitySample.quantityType.identifier)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:130:38: error: 'HKCorrelation' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
128 |     ///   - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
129 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
130 |     open func component(correlation: HKCorrelation ) throws -> [ObservationComponent] {
    |               |                      `- error: 'HKCorrelation' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
131 |         var components: [ObservationComponent] = []
132 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:155:33: error: 'HKSample' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
153 |     /// - Throws:
154 |     ///   - ConversionError: Will throw if the Date cannot be converted to either a FHIR.DateTime or a FHIR.Period
155 |     open func effective(sample: HKSample) throws -> Any {
    |               |                 `- error: 'HKSample' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
156 |         let timeZoneString = sample.metadata?[HKMetadataKeyTimeZone] as? String
157 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ResourceFactoryProtocol.swift:24:35: error: 'HKObject' is only available in macOS 13.0 or newer
10 | import FHIR
11 |
12 | public protocol ResourceFactoryProtocol {
   |                 `- note: add @available attribute to enclosing protocol
13 |
14 |     /// The Apple Health App bundle id used as the identifier system key when creating resources
   :
22 |     ///   - ConversionError: Will throw if a required value is not mapped properly in the config, the type is not supported, or the factory cannot handle the given resource.
23 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
24 |     func resource<T>(from object: HKObject) throws -> T
   |          |                        `- error: 'HKObject' is only available in macOS 13.0 or newer
   |          `- note: add @available attribute to enclosing instance method
25 | }
26 |
[246/247] Compiling HealthKitToFhir DeviceFactory.swift
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:15:42: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    |                 |                        `- error: 'HKObject' is only available in macOS 13.0 or newer
    |                 `- note: add @available attribute to enclosing instance method
 16 |         guard T.self is Device.Type else {
 17 |             throw ConversionError.incorrectTypeForFactory
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:23:35: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 21 |     }
 22 |
 23 |     open func device(from object: HKObject) throws -> Device {
    |               |                   `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 24 |         let device = Device()
 25 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:63:62: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 61 |     ///   - device: The Device object that the UDI should be added to.
 62 |     ///   - object: The HKObject.
 63 |     open func addUdiDeviceIdentifier(device: Device, object: HKObject) {
    |               |                                              `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 64 |         var udiCarrier = device.udiCarrier ?? [DeviceUdiCarrier]()
 65 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:81:51: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               |                                   `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:116:48: error: 'HKObject' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
114 |     ///   - device: The Device object that the name information should be added to.
115 |     ///   - object: The HKObject.
116 |     open func addNames(device: Device, object: HKObject) {
    |               |                                `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
117 |         var deviceNames = device.deviceName ?? [DeviceDeviceName]()
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:27:109: error: 'sourceRevision' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 21 |     }
 22 |
 23 |     open func device(from object: HKObject) throws -> Device {
    |               `- note: add @available attribute to enclosing instance method
 24 |         let device = Device()
 25 |
 26 |         // Add the sourceRevision.source.bundleIdentifier as the Device identifier.
 27 |         device.identifier = [try identifier(system: FactoryBase.healthKitIdentifierSystemKey, value: object.sourceRevision.source.bundleIdentifier)]
    |                                                                                                             |- error: 'sourceRevision' is only available in macOS 13.0 or newer
    |                                                                                                             `- note: add 'if #available' version check
 28 |
 29 |         // Add the local identifier to the device
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:30:40: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 21 |     }
 22 |
 23 |     open func device(from object: HKObject) throws -> Device {
    |               `- note: add @available attribute to enclosing instance method
 24 |         let device = Device()
 25 |
    :
 28 |
 29 |         // Add the local identifier to the device
 30 |         if let localIdentifer = object.device?.localIdentifier {
    |                                        |- error: 'device' is only available in macOS 13.0 or newer
    |                                        `- note: add 'if #available' version check
 31 |             let codeableConcept = CodeableConcept()
 32 |             codeableConcept.coding = [try coding(system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.localIdentifier).keyPath)]
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:32:130: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 21 |     }
 22 |
 23 |     open func device(from object: HKObject) throws -> Device {
    |               `- note: add @available attribute to enclosing instance method
 24 |         let device = Device()
 25 |
    :
 30 |         if let localIdentifer = object.device?.localIdentifier {
 31 |             let codeableConcept = CodeableConcept()
 32 |             codeableConcept.coding = [try coding(system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.localIdentifier).keyPath)]
    |                                                                                                                                  |- error: 'device' is only available in macOS 13.0 or newer
    |                                                                                                                                  `- note: add 'if #available' version check
 33 |             device.identifier?.append(identifier(type: codeableConcept, value: localIdentifer))
 34 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:37:38: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 21 |     }
 22 |
 23 |     open func device(from object: HKObject) throws -> Device {
    |               `- note: add @available attribute to enclosing instance method
 24 |         let device = Device()
 25 |
    :
 35 |
 36 |         // Add the manufacturer.
 37 |         if let manufacturer = object.device?.manufacturer {
    |                                      |- error: 'device' is only available in macOS 13.0 or newer
    |                                      `- note: add 'if #available' version check
 38 |             device.manufacturer = FHIRString(manufacturer)
 39 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:42:31: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 21 |     }
 22 |
 23 |     open func device(from object: HKObject) throws -> Device {
    |               `- note: add @available attribute to enclosing instance method
 24 |         let device = Device()
 25 |
    :
 40 |
 41 |         // Add the model.
 42 |         if let model = object.device?.model {
    |                               |- error: 'device' is only available in macOS 13.0 or newer
    |                               `- note: add 'if #available' version check
 43 |             device.modelNumber = FHIRString(model)
 44 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:66:45: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 61 |     ///   - device: The Device object that the UDI should be added to.
 62 |     ///   - object: The HKObject.
 63 |     open func addUdiDeviceIdentifier(device: Device, object: HKObject) {
    |               `- note: add @available attribute to enclosing instance method
 64 |         var udiCarrier = device.udiCarrier ?? [DeviceUdiCarrier]()
 65 |
 66 |         if let udiDeviceIdentifier = object.device?.udiDeviceIdentifier {
    |                                             |- error: 'device' is only available in macOS 13.0 or newer
    |                                             `- note: add 'if #available' version check
 67 |             let udiDeviceCarrier = DeviceUdiCarrier()
 68 |             udiDeviceCarrier.entryType = .selfReported
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:85:32: error: 'sourceRevision' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
 84 |         // Add the operatingSystemVersion from the sourceRevision
 85 |         let osVersion = object.sourceRevision.operatingSystemVersion
    |                                |- error: 'sourceRevision' is only available in macOS 13.0 or newer
    |                                `- note: add 'if #available' version check
 86 |         deviceVersions.append(try deviceVersion(version: "\(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)", system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.operatingSystemVersion).keyPath))
 87 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:85:47: error: 'operatingSystemVersion' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
 84 |         // Add the operatingSystemVersion from the sourceRevision
 85 |         let osVersion = object.sourceRevision.operatingSystemVersion
    |                                               |- error: 'operatingSystemVersion' is only available in macOS 13.0 or newer
    |                                               `- note: add 'if #available' version check
 86 |         deviceVersions.append(try deviceVersion(version: "\(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)", system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.operatingSystemVersion).keyPath))
 87 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:86:219: error: 'sourceRevision' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
 84 |         // Add the operatingSystemVersion from the sourceRevision
 85 |         let osVersion = object.sourceRevision.operatingSystemVersion
 86 |         deviceVersions.append(try deviceVersion(version: "\(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)", system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.operatingSystemVersion).keyPath))
    |                                                                                                                                                                                                                           |- error: 'sourceRevision' is only available in macOS 13.0 or newer
    |                                                                                                                                                                                                                           `- note: add 'if #available' version check
 87 |
 88 |         // Add the version from the sourceRevision
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:86:234: error: 'operatingSystemVersion' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
 84 |         // Add the operatingSystemVersion from the sourceRevision
 85 |         let osVersion = object.sourceRevision.operatingSystemVersion
 86 |         deviceVersions.append(try deviceVersion(version: "\(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)", system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.operatingSystemVersion).keyPath))
    |                                                                                                                                                                                                                                          |- error: 'operatingSystemVersion' is only available in macOS 13.0 or newer
    |                                                                                                                                                                                                                                          `- note: add 'if #available' version check
 87 |
 88 |         // Add the version from the sourceRevision
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:89:33: error: 'sourceRevision' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
    :
 87 |
 88 |         // Add the version from the sourceRevision
 89 |         if let version = object.sourceRevision.version {
    |                                 |- error: 'sourceRevision' is only available in macOS 13.0 or newer
    |                                 `- note: add 'if #available' version check
 90 |             deviceVersions.append(try deviceVersion(version: version, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.version).keyPath))
 91 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:90:151: error: 'sourceRevision' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
    :
 88 |         // Add the version from the sourceRevision
 89 |         if let version = object.sourceRevision.version {
 90 |             deviceVersions.append(try deviceVersion(version: version, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.version).keyPath))
    |                                                                                                                                                       |- error: 'sourceRevision' is only available in macOS 13.0 or newer
    |                                                                                                                                                       `- note: add 'if #available' version check
 91 |         }
 92 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:94:41: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
    :
 92 |
 93 |         // Add the firmware version from the device.
 94 |         if let firmwareVersion = object.device?.firmwareVersion {
    |                                         |- error: 'device' is only available in macOS 13.0 or newer
    |                                         `- note: add 'if #available' version check
 95 |             deviceVersions.append(try deviceVersion(version: firmwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.firmwareVersion).keyPath))
 96 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:95:159: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
    :
 93 |         // Add the firmware version from the device.
 94 |         if let firmwareVersion = object.device?.firmwareVersion {
 95 |             deviceVersions.append(try deviceVersion(version: firmwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.firmwareVersion).keyPath))
    |                                                                                                                                                               |- error: 'device' is only available in macOS 13.0 or newer
    |                                                                                                                                                               `- note: add 'if #available' version check
 96 |         }
 97 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:99:41: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
    :
 97 |
 98 |         // Add the hardware version from the device.
 99 |         if let hardwareVersion = object.device?.hardwareVersion {
    |                                         |- error: 'device' is only available in macOS 13.0 or newer
    |                                         `- note: add 'if #available' version check
100 |             deviceVersions.append(try deviceVersion(version: hardwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.hardwareVersion).keyPath))
101 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:100:159: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
    :
 98 |         // Add the hardware version from the device.
 99 |         if let hardwareVersion = object.device?.hardwareVersion {
100 |             deviceVersions.append(try deviceVersion(version: hardwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.hardwareVersion).keyPath))
    |                                                                                                                                                               |- error: 'device' is only available in macOS 13.0 or newer
    |                                                                                                                                                               `- note: add 'if #available' version check
101 |         }
102 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:104:41: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
    :
102 |
103 |         // Add the software version from the device.
104 |         if let softwareVersion = object.device?.softwareVersion {
    |                                         |- error: 'device' is only available in macOS 13.0 or newer
    |                                         `- note: add 'if #available' version check
105 |             deviceVersions.append(try deviceVersion(version: softwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.softwareVersion).keyPath))
106 |         }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:105:159: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
 79 |     ///   - device: The Device object that the version information should be added to.
 80 |     ///   - object: The HKObject.
 81 |     open func addVersions(device: Device, object: HKObject) throws {
    |               `- note: add @available attribute to enclosing instance method
 82 |         var deviceVersions = device.version ?? [DeviceVersion]()
 83 |
    :
103 |         // Add the software version from the device.
104 |         if let softwareVersion = object.device?.softwareVersion {
105 |             deviceVersions.append(try deviceVersion(version: softwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.softwareVersion).keyPath))
    |                                                                                                                                                               |- error: 'device' is only available in macOS 13.0 or newer
    |                                                                                                                                                               `- note: add 'if #available' version check
106 |         }
107 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:120:69: error: 'sourceRevision' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
114 |     ///   - device: The Device object that the name information should be added to.
115 |     ///   - object: The HKObject.
116 |     open func addNames(device: Device, object: HKObject) {
    |               `- note: add @available attribute to enclosing instance method
117 |         var deviceNames = device.deviceName ?? [DeviceDeviceName]()
118 |
119 |         // Add the name from the source.
120 |         deviceNames.append(DeviceDeviceName(name: FHIRString(object.sourceRevision.source.name), type: .userFriendlyName))
    |                                                                     |- error: 'sourceRevision' is only available in macOS 13.0 or newer
    |                                                                     `- note: add 'if #available' version check
121 |
122 |         // Add the name from the device.
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:123:30: error: 'device' is only available in macOS 13.0 or newer
 11 |
 12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
 13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 14 |
 15 |     public func resource<T>(from object: HKObject) throws -> T {
    :
114 |     ///   - device: The Device object that the name information should be added to.
115 |     ///   - object: The HKObject.
116 |     open func addNames(device: Device, object: HKObject) {
    |               `- note: add @available attribute to enclosing instance method
117 |         var deviceNames = device.deviceName ?? [DeviceDeviceName]()
118 |
    :
121 |
122 |         // Add the name from the device.
123 |         if let name = object.device?.name {
    |                              |- error: 'device' is only available in macOS 13.0 or newer
    |                              `- note: add 'if #available' version check
124 |             deviceNames.append(DeviceDeviceName(name: FHIRString(name), type: .modelName))
125 |         }
[247/247] Compiling HealthKitToFhir ObservationFactory.swift
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:29:42: error: 'HKObject' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 27 |     }
 28 |
 29 |     public func resource<T>(from object: HKObject) throws -> T {
    |                 |                        `- error: 'HKObject' is only available in macOS 13.0 or newer
    |                 `- note: add @available attribute to enclosing instance method
 30 |         guard T.self is Observation.Type else {
 31 |             throw ConversionError.incorrectTypeForFactory
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:44:40: error: 'HKObject' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 42 |     ///   - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
 43 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
 44 |     open func observation(from object: HKObject) throws -> Observation {
    |               |                        `- error: 'HKObject' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 45 |         guard let sample = object as? HKSample else {
 46 |             // The given type is not currently supported.
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:87:43: error: 'HKObjectType' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 85 |     ///   - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
 86 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
 87 |     open func codeableConcept(objectType: HKObjectType) throws -> CodeableConcept {
    |               |                           `- error: 'HKObjectType' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
 88 |         guard let conversionValues = conversionMap[objectType.identifier] else {
 89 |             throw ConversionError.conversionNotDefinedForType(identifier: objectType.identifier)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:106:45: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
104 |     ///   - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
105 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
106 |     open func valueQuantity(quantitySample: HKQuantitySample) throws -> Quantity {
    |               |                             `- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
107 |         guard let conversionValues = conversionMap[quantitySample.quantityType.identifier] else {
108 |             throw ConversionError.conversionNotDefinedForType(identifier: quantitySample.quantityType.identifier)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:130:38: error: 'HKCorrelation' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
128 |     ///   - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
129 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
130 |     open func component(correlation: HKCorrelation ) throws -> [ObservationComponent] {
    |               |                      `- error: 'HKCorrelation' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
131 |         var components: [ObservationComponent] = []
132 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:155:33: error: 'HKSample' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
153 |     /// - Throws:
154 |     ///   - ConversionError: Will throw if the Date cannot be converted to either a FHIR.DateTime or a FHIR.Period
155 |     open func effective(sample: HKSample) throws -> Any {
    |               |                 `- error: 'HKSample' is only available in macOS 13.0 or newer
    |               `- note: add @available attribute to enclosing instance method
156 |         let timeZoneString = sample.metadata?[HKMetadataKeyTimeZone] as? String
157 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:45:39: error: 'HKSample' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 42 |     ///   - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
 43 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
 44 |     open func observation(from object: HKObject) throws -> Observation {
    |               `- note: add @available attribute to enclosing instance method
 45 |         guard let sample = object as? HKSample else {
    |                                       |- error: 'HKSample' is only available in macOS 13.0 or newer
    |                                       `- note: add 'if #available' version check
 46 |             // The given type is not currently supported.
 47 |             throw ConversionError.unsupportedType(identifier: String(describing: HKObject.self))
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:47:82: error: 'HKObject' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 42 |     ///   - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
 43 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
 44 |     open func observation(from object: HKObject) throws -> Observation {
    |               `- note: add @available attribute to enclosing instance method
 45 |         guard let sample = object as? HKSample else {
 46 |             // The given type is not currently supported.
 47 |             throw ConversionError.unsupportedType(identifier: String(describing: HKObject.self))
    |                                                                                  |- error: 'HKObject' is only available in macOS 13.0 or newer
    |                                                                                  `- note: add 'if #available' version check
 48 |         }
 49 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:52:44: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 42 |     ///   - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
 43 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
 44 |     open func observation(from object: HKObject) throws -> Observation {
    |               `- note: add @available attribute to enclosing instance method
 45 |         guard let sample = object as? HKSample else {
 46 |             // The given type is not currently supported.
    :
 50 |         let observation = Observation()
 51 |
 52 |         if let quantitySample = sample as? HKQuantitySample {
    |                                            |- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
    |                                            `- note: add 'if #available' version check
 53 |             // The sample is a quantity sample - create a valueQuantity (conversion data provided in the Config).
 54 |             observation.valueQuantity = try self.valueQuantity(quantitySample: quantitySample)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:56:46: error: 'HKCorrelation' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
 42 |     ///   - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
 43 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
 44 |     open func observation(from object: HKObject) throws -> Observation {
    |               `- note: add @available attribute to enclosing instance method
 45 |         guard let sample = object as? HKSample else {
 46 |             // The given type is not currently supported.
    :
 54 |             observation.valueQuantity = try self.valueQuantity(quantitySample: quantitySample)
 55 |         }
 56 |         else if let correlation = sample as? HKCorrelation {
    |                                              |- error: 'HKCorrelation' is only available in macOS 13.0 or newer
    |                                              `- note: add 'if #available' version check
 57 |             // The sample is a correlation - create components with the appropriate values (conversion data provided in the Config).
 58 |             observation.component = try self.component(correlation: correlation)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:119:77: error: 'HKUnit' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
104 |     ///   - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
105 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
106 |     open func valueQuantity(quantitySample: HKQuantitySample) throws -> Quantity {
    |               `- note: add @available attribute to enclosing instance method
107 |         guard let conversionValues = conversionMap[quantitySample.quantityType.identifier] else {
108 |             throw ConversionError.conversionNotDefinedForType(identifier: quantitySample.quantityType.identifier)
    :
117 |         }
118 |
119 |         json[Constants.valueKey] = quantitySample.quantity.doubleValue(for: HKUnit.init(from: unitString))
    |                                                                             |- error: 'HKUnit' is only available in macOS 13.0 or newer
    |                                                                             `- note: add 'if #available' version check
120 |         return try Quantity(json: json)
121 |     }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:134:48: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
128 |     ///   - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
129 |     ///   - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
130 |     open func component(correlation: HKCorrelation ) throws -> [ObservationComponent] {
    |               `- note: add @available attribute to enclosing instance method
131 |         var components: [ObservationComponent] = []
132 |
133 |         for sample in correlation.objects {
134 |             if let quantitySample = sample as? HKQuantitySample {
    |                                                |- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
    |                                                `- note: add 'if #available' version check
135 |                 let codeableConcept = try self.codeableConcept(objectType: quantitySample.sampleType)
136 |                 let component = ObservationComponent(code: codeableConcept)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:156:47: error: 'HKMetadataKeyTimeZone' is only available in macOS 13.0 or newer
 12 |
 13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
 14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
    |            `- note: add @available attribute to enclosing class
 15 |
 16 |     /// Initializes a new ObservationFactory object.
    :
153 |     /// - Throws:
154 |     ///   - ConversionError: Will throw if the Date cannot be converted to either a FHIR.DateTime or a FHIR.Period
155 |     open func effective(sample: HKSample) throws -> Any {
    |               `- note: add @available attribute to enclosing instance method
156 |         let timeZoneString = sample.metadata?[HKMetadataKeyTimeZone] as? String
    |                                               |- error: 'HKMetadataKeyTimeZone' is only available in macOS 13.0 or newer
    |                                               `- note: add 'if #available' version check
157 |
158 |         if (sample.startDate == sample.endDate),
Fetching https://github.com/smart-on-fhir/Swift-FHIR
[1/18089] Fetching swift-fhir
Fetched https://github.com/smart-on-fhir/Swift-FHIR from cache (1.68s)
Computing version for https://github.com/smart-on-fhir/Swift-FHIR
Computed https://github.com/smart-on-fhir/Swift-FHIR at 4.2.1 (2.23s)
Creating working copy for https://github.com/smart-on-fhir/Swift-FHIR
Working copy of https://github.com/smart-on-fhir/Swift-FHIR resolved at 4.2.1
BUILD FAILURE 6.2 macosSpm