From 7ae2f8a4970601868fa6fbcfe7dd7a7d5e6b5408 Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Mon, 25 Jul 2016 16:47:37 +0200 Subject: [PATCH 01/17] Swift 2.3 version on its own branch --- CHANGELOG.md | 5 +++++ OAuth2 | 2 +- SMART.podspec | 2 +- Swift-FHIR | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18456163..603b412a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Changelog ========= +## 2.3 + +- Update for Swift 2.3 + + ## 2.2.3 - Address deprecation warnings appearing with Swift 2.2 (now requires Swift 2.2) diff --git a/OAuth2 b/OAuth2 index 1ebea777..4013b7b6 160000 --- a/OAuth2 +++ b/OAuth2 @@ -1 +1 @@ -Subproject commit 1ebea777da481fcac02ff15c15a70adfe57fb300 +Subproject commit 4013b7b637c18f6059a123e893b5382e744d2075 diff --git a/SMART.podspec b/SMART.podspec index da7e230a..6dfe44ed 100644 --- a/SMART.podspec +++ b/SMART.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.name = "SMART" - s.version = "2.2.3" + s.version = "2.3" s.summary = "Swift SMART on FHIR framework for iOS and OS X" s.description = <<-DESC Swift SMART on FHIR framework for iOS and OS X. diff --git a/Swift-FHIR b/Swift-FHIR index 36774740..21a087ab 160000 --- a/Swift-FHIR +++ b/Swift-FHIR @@ -1 +1 @@ -Subproject commit 36774740d25566f37549cd7179674355a05121a1 +Subproject commit 21a087ab842e891c06931371de9a6528b294f8bf From 066cb06cfd355eba345c17954d4383029d7449aa Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Wed, 10 Aug 2016 10:45:29 +0200 Subject: [PATCH 02/17] Support DSTU-2 data models in Swift 3 --- Info.plist | 4 +- README.md | 2 + Swift-FHIR | 2 +- SwiftSMART.xcodeproj/project.pbxproj | 144 --------------------------- 4 files changed, 5 insertions(+), 147 deletions(-) diff --git a/Info.plist b/Info.plist index 4489fb28..9be120c9 100644 --- a/Info.plist +++ b/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.9 + 2.8 CFBundleSignature ???? CFBundleVersion - 2.9.0.0 + 2.8.0.0 NSPrincipalClass diff --git a/README.md b/README.md index 6fed8198..f1defb1b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ See the `develop` branch or specific `feature/x` branches for new Swift or FHIR Version | Swift | FHIR |   ---------|-----------|---------------|----------------------------- + **2.9** | 3.0 | `1.4.0.8139` | STU 3 Montreal, May 2016 + **2.8** | 3.0 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.2.3**| 2.2 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.2** | 2.0-2.2 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.1** | 2.0-2.2 | `1.0.1.7108` | DSTU 2 diff --git a/Swift-FHIR b/Swift-FHIR index 8b21af8d..44d096bb 160000 --- a/Swift-FHIR +++ b/Swift-FHIR @@ -1 +1 @@ -Subproject commit 8b21af8d1eb4ba55e88e9c77fd3b0def1a261344 +Subproject commit 44d096bbb5fb5b26e14a8a1390317c7b2d82e169 diff --git a/SwiftSMART.xcodeproj/project.pbxproj b/SwiftSMART.xcodeproj/project.pbxproj index cbe147ca..34eb07b1 100644 --- a/SwiftSMART.xcodeproj/project.pbxproj +++ b/SwiftSMART.xcodeproj/project.pbxproj @@ -318,54 +318,6 @@ EE56A6281ABB6A6F00FA99EB /* ProcessRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE56A6211ABB6A6F00FA99EB /* ProcessRequest.swift */; }; EE56A6291ABB6A6F00FA99EB /* ProcessResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE56A6221ABB6A6F00FA99EB /* ProcessResponse.swift */; }; EE56A62A1ABB6A6F00FA99EB /* ProcessResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE56A6221ABB6A6F00FA99EB /* ProcessResponse.swift */; }; - EE65DB9B1CB3E47300E25C72 /* ActionDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB831CB3E47200E25C72 /* ActionDefinition.swift */; }; - EE65DB9C1CB3E47300E25C72 /* ActionDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB831CB3E47200E25C72 /* ActionDefinition.swift */; }; - EE65DB9D1CB3E47300E25C72 /* CareTeam.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB841CB3E47200E25C72 /* CareTeam.swift */; }; - EE65DB9E1CB3E47300E25C72 /* CareTeam.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB841CB3E47200E25C72 /* CareTeam.swift */; }; - EE65DB9F1CB3E47300E25C72 /* CodeSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB851CB3E47200E25C72 /* CodeSystem.swift */; }; - EE65DBA01CB3E47300E25C72 /* CodeSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB851CB3E47200E25C72 /* CodeSystem.swift */; }; - EE65DBA11CB3E47300E25C72 /* CompartmentDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB861CB3E47200E25C72 /* CompartmentDefinition.swift */; }; - EE65DBA21CB3E47300E25C72 /* CompartmentDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB861CB3E47200E25C72 /* CompartmentDefinition.swift */; }; - EE65DBA31CB3E47300E25C72 /* DataRequirement.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB871CB3E47200E25C72 /* DataRequirement.swift */; }; - EE65DBA41CB3E47300E25C72 /* DataRequirement.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB871CB3E47200E25C72 /* DataRequirement.swift */; }; - EE65DBA51CB3E47300E25C72 /* DecisionSupportRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB881CB3E47200E25C72 /* DecisionSupportRule.swift */; }; - EE65DBA61CB3E47300E25C72 /* DecisionSupportRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB881CB3E47200E25C72 /* DecisionSupportRule.swift */; }; - EE65DBA71CB3E47300E25C72 /* DecisionSupportServiceModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB891CB3E47200E25C72 /* DecisionSupportServiceModule.swift */; }; - EE65DBA81CB3E47300E25C72 /* DecisionSupportServiceModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB891CB3E47200E25C72 /* DecisionSupportServiceModule.swift */; }; - EE65DBA91CB3E47300E25C72 /* ExpansionProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8A1CB3E47200E25C72 /* ExpansionProfile.swift */; }; - EE65DBAA1CB3E47300E25C72 /* ExpansionProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8A1CB3E47200E25C72 /* ExpansionProfile.swift */; }; - EE65DBAB1CB3E47300E25C72 /* GuidanceResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8B1CB3E47200E25C72 /* GuidanceResponse.swift */; }; - EE65DBAC1CB3E47300E25C72 /* GuidanceResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8B1CB3E47200E25C72 /* GuidanceResponse.swift */; }; - EE65DBAD1CB3E47300E25C72 /* ImagingExcerpt.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8C1CB3E47200E25C72 /* ImagingExcerpt.swift */; }; - EE65DBAE1CB3E47300E25C72 /* ImagingExcerpt.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8C1CB3E47200E25C72 /* ImagingExcerpt.swift */; }; - EE65DBAF1CB3E47300E25C72 /* Library.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8D1CB3E47200E25C72 /* Library.swift */; }; - EE65DBB01CB3E47300E25C72 /* Library.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8D1CB3E47200E25C72 /* Library.swift */; }; - EE65DBB11CB3E47300E25C72 /* Linkage.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8E1CB3E47200E25C72 /* Linkage.swift */; }; - EE65DBB21CB3E47300E25C72 /* Linkage.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8E1CB3E47200E25C72 /* Linkage.swift */; }; - EE65DBB31CB3E47300E25C72 /* Measure.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8F1CB3E47200E25C72 /* Measure.swift */; }; - EE65DBB41CB3E47300E25C72 /* Measure.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB8F1CB3E47200E25C72 /* Measure.swift */; }; - EE65DBB51CB3E47300E25C72 /* MeasureReport.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB901CB3E47200E25C72 /* MeasureReport.swift */; }; - EE65DBB61CB3E47300E25C72 /* MeasureReport.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB901CB3E47200E25C72 /* MeasureReport.swift */; }; - EE65DBB71CB3E47300E25C72 /* ModuleDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB911CB3E47200E25C72 /* ModuleDefinition.swift */; }; - EE65DBB81CB3E47300E25C72 /* ModuleDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB911CB3E47200E25C72 /* ModuleDefinition.swift */; }; - EE65DBB91CB3E47300E25C72 /* ModuleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB921CB3E47200E25C72 /* ModuleMetadata.swift */; }; - EE65DBBA1CB3E47300E25C72 /* ModuleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB921CB3E47200E25C72 /* ModuleMetadata.swift */; }; - EE65DBBB1CB3E47300E25C72 /* OrderSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB931CB3E47200E25C72 /* OrderSet.swift */; }; - EE65DBBC1CB3E47300E25C72 /* OrderSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB931CB3E47200E25C72 /* OrderSet.swift */; }; - EE65DBBD1CB3E47300E25C72 /* ParameterDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB941CB3E47300E25C72 /* ParameterDefinition.swift */; }; - EE65DBBE1CB3E47300E25C72 /* ParameterDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB941CB3E47300E25C72 /* ParameterDefinition.swift */; }; - EE65DBBF1CB3E47300E25C72 /* PractitionerRole.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB951CB3E47300E25C72 /* PractitionerRole.swift */; }; - EE65DBC01CB3E47300E25C72 /* PractitionerRole.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB951CB3E47300E25C72 /* PractitionerRole.swift */; }; - EE65DBC11CB3E47300E25C72 /* ProtocolFHIR.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB961CB3E47300E25C72 /* ProtocolFHIR.swift */; }; - EE65DBC21CB3E47300E25C72 /* ProtocolFHIR.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB961CB3E47300E25C72 /* ProtocolFHIR.swift */; }; - EE65DBC31CB3E47300E25C72 /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB971CB3E47300E25C72 /* Sequence.swift */; }; - EE65DBC41CB3E47300E25C72 /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB971CB3E47300E25C72 /* Sequence.swift */; }; - EE65DBC51CB3E47300E25C72 /* StructureMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB981CB3E47300E25C72 /* StructureMap.swift */; }; - EE65DBC61CB3E47300E25C72 /* StructureMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB981CB3E47300E25C72 /* StructureMap.swift */; }; - EE65DBC71CB3E47300E25C72 /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB991CB3E47300E25C72 /* Task.swift */; }; - EE65DBC81CB3E47300E25C72 /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB991CB3E47300E25C72 /* Task.swift */; }; - EE65DBC91CB3E47300E25C72 /* TriggerDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB9A1CB3E47300E25C72 /* TriggerDefinition.swift */; }; - EE65DBCA1CB3E47300E25C72 /* TriggerDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE65DB9A1CB3E47300E25C72 /* TriggerDefinition.swift */; }; EE8EE6BF1B1290AA005B90C5 /* OAuth2Authorizer+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE8EE6BD1B1290AA005B90C5 /* OAuth2Authorizer+iOS.swift */; }; EE8EE6C01B1290AA005B90C5 /* OAuth2WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE8EE6BE1B1290AA005B90C5 /* OAuth2WebViewController.swift */; }; EE8EE6C31B1290B7005B90C5 /* OAuth2Authorizer+macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE8EE6C21B1290B7005B90C5 /* OAuth2Authorizer+macOS.swift */; }; @@ -629,30 +581,6 @@ EE56A6211ABB6A6F00FA99EB /* ProcessRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessRequest.swift; sourceTree = ""; }; EE56A6221ABB6A6F00FA99EB /* ProcessResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessResponse.swift; sourceTree = ""; }; EE56A62C1ABB6D7700FA99EB /* SwiftFHIR.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftFHIR.xcodeproj; path = "Swift-FHIR/SwiftFHIR.xcodeproj"; sourceTree = ""; }; - EE65DB831CB3E47200E25C72 /* ActionDefinition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionDefinition.swift; sourceTree = ""; }; - EE65DB841CB3E47200E25C72 /* CareTeam.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CareTeam.swift; sourceTree = ""; }; - EE65DB851CB3E47200E25C72 /* CodeSystem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodeSystem.swift; sourceTree = ""; }; - EE65DB861CB3E47200E25C72 /* CompartmentDefinition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompartmentDefinition.swift; sourceTree = ""; }; - EE65DB871CB3E47200E25C72 /* DataRequirement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataRequirement.swift; sourceTree = ""; }; - EE65DB881CB3E47200E25C72 /* DecisionSupportRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecisionSupportRule.swift; sourceTree = ""; }; - EE65DB891CB3E47200E25C72 /* DecisionSupportServiceModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecisionSupportServiceModule.swift; sourceTree = ""; }; - EE65DB8A1CB3E47200E25C72 /* ExpansionProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExpansionProfile.swift; sourceTree = ""; }; - EE65DB8B1CB3E47200E25C72 /* GuidanceResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GuidanceResponse.swift; sourceTree = ""; }; - EE65DB8C1CB3E47200E25C72 /* ImagingExcerpt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImagingExcerpt.swift; sourceTree = ""; }; - EE65DB8D1CB3E47200E25C72 /* Library.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Library.swift; sourceTree = ""; }; - EE65DB8E1CB3E47200E25C72 /* Linkage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Linkage.swift; sourceTree = ""; }; - EE65DB8F1CB3E47200E25C72 /* Measure.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Measure.swift; sourceTree = ""; }; - EE65DB901CB3E47200E25C72 /* MeasureReport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MeasureReport.swift; sourceTree = ""; }; - EE65DB911CB3E47200E25C72 /* ModuleDefinition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ModuleDefinition.swift; sourceTree = ""; }; - EE65DB921CB3E47200E25C72 /* ModuleMetadata.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ModuleMetadata.swift; sourceTree = ""; }; - EE65DB931CB3E47200E25C72 /* OrderSet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderSet.swift; sourceTree = ""; }; - EE65DB941CB3E47300E25C72 /* ParameterDefinition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ParameterDefinition.swift; sourceTree = ""; }; - EE65DB951CB3E47300E25C72 /* PractitionerRole.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PractitionerRole.swift; sourceTree = ""; }; - EE65DB961CB3E47300E25C72 /* ProtocolFHIR.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProtocolFHIR.swift; sourceTree = ""; }; - EE65DB971CB3E47300E25C72 /* Sequence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sequence.swift; sourceTree = ""; }; - EE65DB981CB3E47300E25C72 /* StructureMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StructureMap.swift; sourceTree = ""; }; - EE65DB991CB3E47300E25C72 /* Task.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Task.swift; sourceTree = ""; }; - EE65DB9A1CB3E47300E25C72 /* TriggerDefinition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TriggerDefinition.swift; sourceTree = ""; }; EE74D04B195C112300393DCA /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; EE7907B01B1566A100B1B279 /* SMART.podspec */ = {isa = PBXFileReference; lastKnownFileType = file; path = SMART.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; EE8EE6BD1B1290AA005B90C5 /* OAuth2Authorizer+iOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OAuth2Authorizer+iOS.swift"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; @@ -879,7 +807,6 @@ isa = PBXGroup; children = ( EEEE30CC1BB1FD53008866E2 /* Account.swift */, - EE65DB831CB3E47200E25C72 /* ActionDefinition.swift */, EE56A4621ABB0B7900FA99EB /* Address.swift */, EE56A4631ABB0B7900FA99EB /* Age.swift */, EE56A4651ABB0B7900FA99EB /* AllergyIntolerance.swift */, @@ -894,16 +821,13 @@ EE56A46C1ABB0B7900FA99EB /* BodySite.swift */, EE56A46D1ABB0B7900FA99EB /* Bundle.swift */, EE56A46E1ABB0B7900FA99EB /* CarePlan.swift */, - EE65DB841CB3E47200E25C72 /* CareTeam.swift */, EE56A61F1ABB6A6F00FA99EB /* Claim.swift */, EE56A4701ABB0B7900FA99EB /* ClaimResponse.swift */, EE56A6201ABB6A6F00FA99EB /* ClinicalImpression.swift */, EE56A4721ABB0B7900FA99EB /* CodeableConcept.swift */, - EE65DB851CB3E47200E25C72 /* CodeSystem.swift */, EE56A4731ABB0B7900FA99EB /* Coding.swift */, EE56A4741ABB0B7900FA99EB /* Communication.swift */, EE56A4751ABB0B7900FA99EB /* CommunicationRequest.swift */, - EE65DB861CB3E47200E25C72 /* CompartmentDefinition.swift */, EE56A4761ABB0B7900FA99EB /* Composition.swift */, EE56A4771ABB0B7900FA99EB /* ConceptMap.swift */, EE56A4781ABB0B7900FA99EB /* Condition.swift */, @@ -913,10 +837,7 @@ EE56A47D1ABB0B7900FA99EB /* Count.swift */, EE56A47E1ABB0B7900FA99EB /* Coverage.swift */, EE56A47F1ABB0B7900FA99EB /* DataElement.swift */, - EE65DB871CB3E47200E25C72 /* DataRequirement.swift */, EE3907B41C3E8287005BFF3D /* DateAndTime.swift */, - EE65DB881CB3E47200E25C72 /* DecisionSupportRule.swift */, - EE65DB891CB3E47200E25C72 /* DecisionSupportServiceModule.swift */, EEEE30CE1BB1FD53008866E2 /* DetectedIssue.swift */, EE56A4811ABB0B7900FA99EB /* Device.swift */, EE56A4821ABB0B7900FA99EB /* DeviceComponent.swift */, @@ -938,7 +859,6 @@ EE56A4911ABB0B7900FA99EB /* EnrollmentRequest.swift */, EE56A4921ABB0B7900FA99EB /* EnrollmentResponse.swift */, EE56A4931ABB0B7900FA99EB /* EpisodeOfCare.swift */, - EE65DB8A1CB3E47200E25C72 /* ExpansionProfile.swift */, EE56A4941ABB0B7900FA99EB /* ExplanationOfBenefit.swift */, EE56A4951ABB0B7900FA99EB /* Extension.swift */, EE02F8031ACF2FC500179969 /* FamilyMemberHistory.swift */, @@ -952,23 +872,17 @@ EE02F8041ACF2FC500179969 /* Flag.swift */, EE56A49F1ABB0B7900FA99EB /* Goal.swift */, EE56A4A01ABB0B7900FA99EB /* Group.swift */, - EE65DB8B1CB3E47200E25C72 /* GuidanceResponse.swift */, EE56A4A11ABB0B7900FA99EB /* HealthcareService.swift */, EE56A4A21ABB0B7900FA99EB /* HumanName.swift */, EE56A4A31ABB0B7900FA99EB /* Identifier.swift */, - EE65DB8C1CB3E47200E25C72 /* ImagingExcerpt.swift */, EE56A4A41ABB0B7900FA99EB /* ImagingObjectSelection.swift */, EE56A4A51ABB0B7900FA99EB /* ImagingStudy.swift */, EE56A4A61ABB0B7900FA99EB /* Immunization.swift */, EE56A4A71ABB0B7900FA99EB /* ImmunizationRecommendation.swift */, EEEE30CF1BB1FD53008866E2 /* ImplementationGuide.swift */, EE3907BD1C3E8287005BFF3D /* JSON-extensions.swift */, - EE65DB8D1CB3E47200E25C72 /* Library.swift */, - EE65DB8E1CB3E47200E25C72 /* Linkage.swift */, EE56A4AA1ABB0B7900FA99EB /* List.swift */, EE56A4AB1ABB0B7900FA99EB /* Location.swift */, - EE65DB8F1CB3E47200E25C72 /* Measure.swift */, - EE65DB901CB3E47200E25C72 /* MeasureReport.swift */, EE56A4AC1ABB0B7900FA99EB /* Media.swift */, EE56A4AD1ABB0B7900FA99EB /* Medication.swift */, EE56A4AE1ABB0B7900FA99EB /* MedicationAdministration.swift */, @@ -977,8 +891,6 @@ EE56A4B11ABB0B7900FA99EB /* MedicationStatement.swift */, EE56A4B21ABB0B7900FA99EB /* MessageHeader.swift */, EE56A4B31ABB0B7900FA99EB /* Meta.swift */, - EE65DB911CB3E47200E25C72 /* ModuleDefinition.swift */, - EE65DB921CB3E47200E25C72 /* ModuleMetadata.swift */, EE56A4B41ABB0B7900FA99EB /* Money.swift */, EE56A4B51ABB0B7900FA99EB /* NamingSystem.swift */, EE56A4B61ABB0B7900FA99EB /* Narrative.swift */, @@ -988,9 +900,7 @@ EE56A4BA1ABB0B7900FA99EB /* OperationOutcome.swift */, EE56A4BC1ABB0B7900FA99EB /* Order.swift */, EE56A4BD1ABB0B7900FA99EB /* OrderResponse.swift */, - EE65DB931CB3E47200E25C72 /* OrderSet.swift */, EE56A4BE1ABB0B7900FA99EB /* Organization.swift */, - EE65DB941CB3E47300E25C72 /* ParameterDefinition.swift */, EE56A4C01ABB0B7900FA99EB /* Parameters.swift */, EE56A4C11ABB0B7900FA99EB /* Patient.swift */, EE56A4C21ABB0B7900FA99EB /* PaymentNotice.swift */, @@ -998,12 +908,10 @@ EE56A4C51ABB0B7900FA99EB /* Period.swift */, EE56A4C61ABB0B7900FA99EB /* Person.swift */, EE56A4C81ABB0B7900FA99EB /* Practitioner.swift */, - EE65DB951CB3E47300E25C72 /* PractitionerRole.swift */, EE56A4C91ABB0B7900FA99EB /* Procedure.swift */, EE56A4CA1ABB0B7900FA99EB /* ProcedureRequest.swift */, EE56A6211ABB6A6F00FA99EB /* ProcessRequest.swift */, EE56A6221ABB6A6F00FA99EB /* ProcessResponse.swift */, - EE65DB961CB3E47300E25C72 /* ProtocolFHIR.swift */, EE56A4CC1ABB0B7900FA99EB /* Provenance.swift */, EE56A4CD1ABB0B7900FA99EB /* Quantity.swift */, EE56A4CE1ABB0B7900FA99EB /* Questionnaire.swift */, @@ -1018,20 +926,16 @@ EE56A4D91ABB0B7900FA99EB /* SampledData.swift */, EE56A4DA1ABB0B7900FA99EB /* Schedule.swift */, EE56A4DB1ABB0B7900FA99EB /* SearchParameter.swift */, - EE65DB971CB3E47300E25C72 /* Sequence.swift */, EE56A4DC1ABB0B7900FA99EB /* Signature.swift */, EE56A4DD1ABB0B7900FA99EB /* Slot.swift */, EE56A4DE1ABB0B7900FA99EB /* Specimen.swift */, EE56A4E11ABB0B7900FA99EB /* StructureDefinition.swift */, - EE65DB981CB3E47300E25C72 /* StructureMap.swift */, EE56A4E21ABB0B7900FA99EB /* Subscription.swift */, EE56A4E31ABB0B7900FA99EB /* Substance.swift */, EEEE30D31BB1FD53008866E2 /* SupplyDelivery.swift */, EEEE30D41BB1FD53008866E2 /* SupplyRequest.swift */, - EE65DB991CB3E47300E25C72 /* Task.swift */, EEEE30D51BB1FD53008866E2 /* TestScript.swift */, EE56A4E61ABB0B7900FA99EB /* Timing.swift */, - EE65DB9A1CB3E47300E25C72 /* TriggerDefinition.swift */, EE56A4E71ABB0B7900FA99EB /* ValueSet.swift */, EE56A4E91ABB0B7900FA99EB /* VisionPrescription.swift */, ); @@ -1328,13 +1232,11 @@ EE56A5241ABB0B7900FA99EB /* Coverage.swift in Sources */, EE56A5C21ABB0B7A00FA99EB /* Quantity.swift in Sources */, EE56A5901ABB0B7900FA99EB /* Money.swift in Sources */, - EE65DBC31CB3E47300E25C72 /* Sequence.swift in Sources */, EE56A5801ABB0B7900FA99EB /* Media.swift in Sources */, EE56A5021ABB0B7900FA99EB /* Bundle.swift in Sources */, EE56A5441ABB0B7900FA99EB /* EligibilityRequest.swift in Sources */, EE43B1C619546DB20017679A /* Client.swift in Sources */, EE56A5041ABB0B7900FA99EB /* CarePlan.swift in Sources */, - EE65DBB31CB3E47300E25C72 /* Measure.swift in Sources */, EE56A5D01ABB0B7A00FA99EB /* ReferralRequest.swift in Sources */, EE56A5761ABB0B7900FA99EB /* ImmunizationRecommendation.swift in Sources */, EE56A58A1ABB0B7900FA99EB /* MedicationStatement.swift in Sources */, @@ -1345,17 +1247,14 @@ EE56A5741ABB0B7900FA99EB /* Immunization.swift in Sources */, EE56A51C1ABB0B7900FA99EB /* ContactPoint.swift in Sources */, EE56A5921ABB0B7900FA99EB /* NamingSystem.swift in Sources */, - EE65DBA71CB3E47300E25C72 /* DecisionSupportServiceModule.swift in Sources */, EE56A5A81ABB0B7A00FA99EB /* Parameters.swift in Sources */, EE02F8071ACF2FC500179969 /* Flag.swift in Sources */, EE56A4FA1ABB0B7900FA99EB /* AuditEvent.swift in Sources */, - EE65DBA91CB3E47300E25C72 /* ExpansionProfile.swift in Sources */, EEDDAC621A89237900844B48 /* PatientListQuery.swift in Sources */, EE56A4F81ABB0B7900FA99EB /* Attachment.swift in Sources */, EE9B32061ACAE6A900980AA9 /* FHIRServerRequestHandler.swift in Sources */, EEEE30DF1BB1FD53008866E2 /* TestScript.swift in Sources */, EE56A4EC1ABB0B7900FA99EB /* Address.swift in Sources */, - EE65DBB91CB3E47300E25C72 /* ModuleMetadata.swift in Sources */, EE56A54E1ABB0B7900FA99EB /* EpisodeOfCare.swift in Sources */, EE56A59C1ABB0B7A00FA99EB /* OperationOutcome.swift in Sources */, EE56A5D41ABB0B7A00FA99EB /* Resource.swift in Sources */, @@ -1364,7 +1263,6 @@ EE56A5DA1ABB0B7A00FA99EB /* SampledData.swift in Sources */, EE43B1C719546DB20017679A /* Server.swift in Sources */, EE8EE6BF1B1290AA005B90C5 /* OAuth2Authorizer+iOS.swift in Sources */, - EE65DBA11CB3E47300E25C72 /* CompartmentDefinition.swift in Sources */, EE56A5C01ABB0B7A00FA99EB /* Provenance.swift in Sources */, EE56A5961ABB0B7A00FA99EB /* NutritionOrder.swift in Sources */, EE56A52E1ABB0B7900FA99EB /* DeviceMetric.swift in Sources */, @@ -1379,7 +1277,6 @@ EE01F97A1C591640003AEA7E /* DomainResource+Containment.swift in Sources */, EE13CDE11D4A61B9005537E9 /* OAuth2Error.swift in Sources */, EE56A5BC1ABB0B7A00FA99EB /* ProcedureRequest.swift in Sources */, - EE65DBAD1CB3E47300E25C72 /* ImagingExcerpt.swift in Sources */, EE13CDD11D4A61B9005537E9 /* extensions.swift in Sources */, EE13CE031D4A61D1005537E9 /* OAuth2DynReg.swift in Sources */, EE13CDF91D4A61D1005537E9 /* OAuth2CodeGrant.swift in Sources */, @@ -1387,7 +1284,6 @@ EE56A5E41ABB0B7A00FA99EB /* Specimen.swift in Sources */, EE3907D91C3E855D005BFF3D /* Element+Extensions.swift in Sources */, EE56A5421ABB0B7900FA99EB /* ElementDefinition.swift in Sources */, - EE65DB9B1CB3E47300E25C72 /* ActionDefinition.swift in Sources */, EE56A5EE1ABB0B7A00FA99EB /* Substance.swift in Sources */, EE3907DD1C3E855D005BFF3D /* FHIRServerDataResponse.swift in Sources */, EE56A5D81ABB0B7A00FA99EB /* RiskAssessment.swift in Sources */, @@ -1401,7 +1297,6 @@ EE13CE071D4A61D1005537E9 /* OAuth2PasswordGrant.swift in Sources */, EE56A5A41ABB0B7A00FA99EB /* Organization.swift in Sources */, EE9B31F91ACADAF700980AA9 /* Resource+REST.swift in Sources */, - EE65DBBF1CB3E47300E25C72 /* PractitionerRole.swift in Sources */, EE56A5F61ABB0B7A00FA99EB /* ValueSet.swift in Sources */, EE56A5101ABB0B7900FA99EB /* Communication.swift in Sources */, EE56A5681ABB0B7900FA99EB /* Group.swift in Sources */, @@ -1423,7 +1318,6 @@ EE56A53A1ABB0B7900FA99EB /* DocumentManifest.swift in Sources */, EE56A4EE1ABB0B7900FA99EB /* Age.swift in Sources */, EE56A5321ABB0B7900FA99EB /* DeviceUseStatement.swift in Sources */, - EE65DBB71CB3E47300E25C72 /* ModuleDefinition.swift in Sources */, EE13CDD71D4A61B9005537E9 /* OAuth2AuthRequest.swift in Sources */, EE56A50E1ABB0B7900FA99EB /* Coding.swift in Sources */, EE56A5941ABB0B7A00FA99EB /* Narrative.swift in Sources */, @@ -1432,23 +1326,16 @@ EE56A5841ABB0B7900FA99EB /* MedicationAdministration.swift in Sources */, EE3907C11C3E8287005BFF3D /* FHIRAbstractBase.swift in Sources */, EE56A51A1ABB0B7900FA99EB /* Conformance.swift in Sources */, - EE65DBAF1CB3E47300E25C72 /* Library.swift in Sources */, EE56A5A01ABB0B7A00FA99EB /* Order.swift in Sources */, EE56A6231ABB6A6F00FA99EB /* Claim.swift in Sources */, EE13CDD91D4A61B9005537E9 /* OAuth2Backing.swift in Sources */, - EE65DB9D1CB3E47300E25C72 /* CareTeam.swift in Sources */, EE56A54C1ABB0B7900FA99EB /* EnrollmentResponse.swift in Sources */, - EE65DBBB1CB3E47300E25C72 /* OrderSet.swift in Sources */, - EE65DBBD1CB3E47300E25C72 /* ParameterDefinition.swift in Sources */, EE56A5B41ABB0B7A00FA99EB /* Person.swift in Sources */, - EE65DBC11CB3E47300E25C72 /* ProtocolFHIR.swift in Sources */, EE56A5FA1ABB0B7A00FA99EB /* VisionPrescription.swift in Sources */, EE56A5721ABB0B7900FA99EB /* ImagingStudy.swift in Sources */, EE56A5821ABB0B7900FA99EB /* Medication.swift in Sources */, EE56A6291ABB6A6F00FA99EB /* ProcessResponse.swift in Sources */, - EE65DBB11CB3E47300E25C72 /* Linkage.swift in Sources */, EE56A5E21ABB0B7A00FA99EB /* Slot.swift in Sources */, - EE65DB9F1CB3E47300E25C72 /* CodeSystem.swift in Sources */, EE56A56E1ABB0B7900FA99EB /* Identifier.swift in Sources */, EE56A52C1ABB0B7900FA99EB /* DeviceComponent.swift in Sources */, EE9B32031ACADE9900980AA9 /* Reference+Resolving.swift in Sources */, @@ -1457,7 +1344,6 @@ EE56A5A21ABB0B7A00FA99EB /* OrderResponse.swift in Sources */, EE3907C61C3E8287005BFF3D /* FHIRServerResponse.swift in Sources */, EE56A5AA1ABB0B7A00FA99EB /* Patient.swift in Sources */, - EE65DBC51CB3E47300E25C72 /* StructureMap.swift in Sources */, EE56A5521ABB0B7900FA99EB /* Extension.swift in Sources */, EEEE30D61BB1FD53008866E2 /* Account.swift in Sources */, EE56A53E1ABB0B7900FA99EB /* DomainResource.swift in Sources */, @@ -1480,12 +1366,10 @@ EE56A5341ABB0B7900FA99EB /* DiagnosticOrder.swift in Sources */, EE3907C21C3E8287005BFF3D /* FHIRAbstractBase+Factory.swift in Sources */, EEEE30DD1BB1FD53008866E2 /* SupplyDelivery.swift in Sources */, - EE65DBA31CB3E47300E25C72 /* DataRequirement.swift in Sources */, EE56A5C81ABB0B7A00FA99EB /* Range.swift in Sources */, EE8EE6D11B1294AA005B90C5 /* Keychain.swift in Sources */, EE02F8051ACF2FC500179969 /* FamilyMemberHistory.swift in Sources */, EE56A58C1ABB0B7900FA99EB /* MessageHeader.swift in Sources */, - EE65DBA51CB3E47300E25C72 /* DecisionSupportRule.swift in Sources */, EE56A58E1ABB0B7900FA99EB /* Meta.swift in Sources */, EE02F8121ACF30B000179969 /* PatientList+iOS.swift in Sources */, EE56A5D21ABB0B7A00FA99EB /* RelatedPerson.swift in Sources */, @@ -1494,7 +1378,6 @@ EE56A5121ABB0B7900FA99EB /* CommunicationRequest.swift in Sources */, EE3907C71C3E8287005BFF3D /* FHIRTypes.swift in Sources */, EE56A5B81ABB0B7A00FA99EB /* Practitioner.swift in Sources */, - EE65DBAB1CB3E47300E25C72 /* GuidanceResponse.swift in Sources */, EE13CDD51D4A61B9005537E9 /* OAuth2AuthorizerUI.swift in Sources */, EEEE30D71BB1FD53008866E2 /* Annotation.swift in Sources */, EE4D58FC1A826097005F5C7A /* PatientList.swift in Sources */, @@ -1507,7 +1390,6 @@ EE56A4FE1ABB0B7900FA99EB /* Binary.swift in Sources */, EE56A5981ABB0B7A00FA99EB /* Observation.swift in Sources */, EE13CDDB1D4A61B9005537E9 /* OAuth2Base.swift in Sources */, - EE65DBB51CB3E47300E25C72 /* MeasureReport.swift in Sources */, EE13CDE51D4A61B9005537E9 /* OAuth2Logger.swift in Sources */, EE56A56A1ABB0B7900FA99EB /* HealthcareService.swift in Sources */, EE56A5481ABB0B7900FA99EB /* Encounter.swift in Sources */, @@ -1515,9 +1397,7 @@ EE56A56C1ABB0B7900FA99EB /* HumanName.swift in Sources */, EE56A5F41ABB0B7A00FA99EB /* Timing.swift in Sources */, EE56A5DC1ABB0B7A00FA99EB /* Schedule.swift in Sources */, - EE65DBC71CB3E47300E25C72 /* Task.swift in Sources */, EE56A5221ABB0B7900FA99EB /* Count.swift in Sources */, - EE65DBC91CB3E47300E25C72 /* TriggerDefinition.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1534,7 +1414,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - EE65DB9E1CB3E47300E25C72 /* CareTeam.swift in Sources */, EE56A52B1ABB0B7900FA99EB /* Device.swift in Sources */, EE02F80B1ACF2FDB00179969 /* FHIRSearch.swift in Sources */, EE3907D11C3E846D005BFF3D /* FHIRServerResponse.swift in Sources */, @@ -1543,7 +1422,6 @@ EE3907CF1C3E846D005BFF3D /* FHIRError.swift in Sources */, EE56A5C91ABB0B7A00FA99EB /* Range.swift in Sources */, EE56A6261ABB6A6F00FA99EB /* ClinicalImpression.swift in Sources */, - EE65DB9C1CB3E47300E25C72 /* ActionDefinition.swift in Sources */, EE56A5C51ABB0B7A00FA99EB /* Questionnaire.swift in Sources */, EE56A52D1ABB0B7900FA99EB /* DeviceComponent.swift in Sources */, EE56A4F31ABB0B7900FA99EB /* AllergyIntolerance.swift in Sources */, @@ -1567,7 +1445,6 @@ EE56A5DD1ABB0B7A00FA99EB /* Schedule.swift in Sources */, EE56A5A51ABB0B7A00FA99EB /* Organization.swift in Sources */, EE56A5D11ABB0B7A00FA99EB /* ReferralRequest.swift in Sources */, - EE65DBA61CB3E47300E25C72 /* DecisionSupportRule.swift in Sources */, EE3907D01C3E846D005BFF3D /* FHIRServer.swift in Sources */, EE56A5B31ABB0B7A00FA99EB /* Period.swift in Sources */, EE56A51F1ABB0B7900FA99EB /* Contract.swift in Sources */, @@ -1595,7 +1472,6 @@ EE8EE6C31B1290B7005B90C5 /* OAuth2Authorizer+macOS.swift in Sources */, EE9EE25F1ACB3E18004DBCBB /* FHIROperation.swift in Sources */, EE56A53D1ABB0B7900FA99EB /* DocumentReference.swift in Sources */, - EE65DBAC1CB3E47300E25C72 /* GuidanceResponse.swift in Sources */, EE56A5F51ABB0B7A00FA99EB /* Timing.swift in Sources */, EE3907E01C3E855D005BFF3D /* Resource+Instantiation.swift in Sources */, EE56A5011ABB0B7900FA99EB /* BodySite.swift in Sources */, @@ -1613,8 +1489,6 @@ EE4D58FD1A826097005F5C7A /* PatientList.swift in Sources */, EE3907DA1C3E855D005BFF3D /* Element+Extensions.swift in Sources */, EE56A5A31ABB0B7A00FA99EB /* OrderResponse.swift in Sources */, - EE65DBBE1CB3E47300E25C72 /* ParameterDefinition.swift in Sources */, - EE65DBAE1CB3E47300E25C72 /* ImagingExcerpt.swift in Sources */, EE3907DE1C3E855D005BFF3D /* FHIRServerDataResponse.swift in Sources */, EE56A57D1ABB0B7900FA99EB /* List.swift in Sources */, EE56A5AD1ABB0B7A00FA99EB /* PaymentNotice.swift in Sources */, @@ -1631,19 +1505,15 @@ EE56A4FF1ABB0B7900FA99EB /* Binary.swift in Sources */, EECAA7261A5D3DE60062C64B /* Server.swift in Sources */, EE56A5531ABB0B7900FA99EB /* Extension.swift in Sources */, - EE65DBA41CB3E47300E25C72 /* DataRequirement.swift in Sources */, EE56A5A91ABB0B7A00FA99EB /* Parameters.swift in Sources */, EE56A5191ABB0B7900FA99EB /* Condition.swift in Sources */, - EE65DBBC1CB3E47300E25C72 /* OrderSet.swift in Sources */, EE56A58F1ABB0B7900FA99EB /* Meta.swift in Sources */, EE13CDDE1D4A61B9005537E9 /* OAuth2ClientConfig.swift in Sources */, - EE65DBBA1CB3E47300E25C72 /* ModuleMetadata.swift in Sources */, EEDDAC5D1A8921F500844B48 /* PatientListOrder.swift in Sources */, EE56A5671ABB0B7900FA99EB /* Goal.swift in Sources */, EE56A5711ABB0B7900FA99EB /* ImagingObjectSelection.swift in Sources */, EE56A5171ABB0B7900FA99EB /* ConceptMap.swift in Sources */, EE56A59D1ABB0B7A00FA99EB /* OperationOutcome.swift in Sources */, - EE65DBA81CB3E47300E25C72 /* DecisionSupportServiceModule.swift in Sources */, EEEE31491BB2F520008866E2 /* SupplyRequest.swift in Sources */, EE13CDD41D4A61B9005537E9 /* OAuth2AuthConfig.swift in Sources */, EE56A5E31ABB0B7A00FA99EB /* Slot.swift in Sources */, @@ -1656,19 +1526,12 @@ EE13CDE41D4A61B9005537E9 /* OAuth2KeychainAccount.swift in Sources */, EE56A5451ABB0B7900FA99EB /* EligibilityRequest.swift in Sources */, EE56A54F1ABB0B7900FA99EB /* EpisodeOfCare.swift in Sources */, - EE65DBA21CB3E47300E25C72 /* CompartmentDefinition.swift in Sources */, EE56A5411ABB0B7900FA99EB /* Duration.swift in Sources */, - EE65DBB61CB3E47300E25C72 /* MeasureReport.swift in Sources */, EE56A5491ABB0B7900FA99EB /* Encounter.swift in Sources */, - EE65DBB21CB3E47300E25C72 /* Linkage.swift in Sources */, - EE65DBC81CB3E47300E25C72 /* Task.swift in Sources */, EE56A5391ABB0B7900FA99EB /* Distance.swift in Sources */, - EE65DBCA1CB3E47300E25C72 /* TriggerDefinition.swift in Sources */, - EE65DBC41CB3E47300E25C72 /* Sequence.swift in Sources */, EE56A5911ABB0B7900FA99EB /* Money.swift in Sources */, EE13CDE61D4A61B9005537E9 /* OAuth2Logger.swift in Sources */, EE56A5811ABB0B7900FA99EB /* Media.swift in Sources */, - EE65DBB41CB3E47300E25C72 /* Measure.swift in Sources */, EE56A5E11ABB0B7A00FA99EB /* Signature.swift in Sources */, EE56A5091ABB0B7900FA99EB /* ClaimResponse.swift in Sources */, EE3907D41C3E848F005BFF3D /* FHIROpenServer.swift in Sources */, @@ -1678,7 +1541,6 @@ EE9B32071ACAE6A900980AA9 /* FHIRServerRequestHandler.swift in Sources */, EEEE314A1BB2F520008866E2 /* TestScript.swift in Sources */, EE56A6241ABB6A6F00FA99EB /* Claim.swift in Sources */, - EE65DBA01CB3E47300E25C72 /* CodeSystem.swift in Sources */, EE13CDFA1D4A61D1005537E9 /* OAuth2CodeGrant.swift in Sources */, EE56A5311ABB0B7900FA99EB /* DeviceUseRequest.swift in Sources */, EE3907CA1C3E846D005BFF3D /* DateAndTime.swift in Sources */, @@ -1689,8 +1551,6 @@ EE56A5991ABB0B7A00FA99EB /* Observation.swift in Sources */, EE9B31FA1ACADAF700980AA9 /* Resource+REST.swift in Sources */, EE56A5BB1ABB0B7A00FA99EB /* Procedure.swift in Sources */, - EE65DBC61CB3E47300E25C72 /* StructureMap.swift in Sources */, - EE65DBB01CB3E47300E25C72 /* Library.swift in Sources */, EE56A5471ABB0B7900FA99EB /* EligibilityResponse.swift in Sources */, EE3907CE1C3E846D005BFF3D /* FHIRAbstractResource.swift in Sources */, EE56A5271ABB0B7900FA99EB /* DataElement.swift in Sources */, @@ -1707,7 +1567,6 @@ EE56A5AB1ABB0B7A00FA99EB /* Patient.swift in Sources */, EE3907CB1C3E846D005BFF3D /* Element.swift in Sources */, EE13CDF41D4A61D1005537E9 /* OAuth2.swift in Sources */, - EE65DBC21CB3E47300E25C72 /* ProtocolFHIR.swift in Sources */, EE02F8061ACF2FC500179969 /* FamilyMemberHistory.swift in Sources */, EE01F97B1C59166C003AEA7E /* DomainResource+Containment.swift in Sources */, EE56A52F1ABB0B7900FA99EB /* DeviceMetric.swift in Sources */, @@ -1717,9 +1576,7 @@ EEEE31461BB2F520008866E2 /* MedicationOrder.swift in Sources */, EE56A5951ABB0B7A00FA99EB /* Narrative.swift in Sources */, EE3907C91C3E846D005BFF3D /* BackboneElement.swift in Sources */, - EE65DBAA1CB3E47300E25C72 /* ExpansionProfile.swift in Sources */, EE56A50F1ABB0B7900FA99EB /* Coding.swift in Sources */, - EE65DBB81CB3E47300E25C72 /* ModuleDefinition.swift in Sources */, EE56A58D1ABB0B7900FA99EB /* MessageHeader.swift in Sources */, EE56A5CB1ABB0B7A00FA99EB /* Ratio.swift in Sources */, EE56A5131ABB0B7900FA99EB /* CommunicationRequest.swift in Sources */, @@ -1727,7 +1584,6 @@ EE13CDD21D4A61B9005537E9 /* extensions.swift in Sources */, EE56A5DB1ABB0B7A00FA99EB /* SampledData.swift in Sources */, EE56A5051ABB0B7900FA99EB /* CarePlan.swift in Sources */, - EE65DBC01CB3E47300E25C72 /* PractitionerRole.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 464e439b672b0e8c562a4e2579508e68b7801dae Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Fri, 16 Sep 2016 09:11:56 +0200 Subject: [PATCH 03/17] Updates for Swift 2.3 --- Info.plist | 4 +-- OAuth2 | 2 +- README.md | 1 + Sources/Client/Auth.swift | 2 +- Sources/Client/Server.swift | 2 +- SwiftSMART.xcodeproj/project.pbxproj | 27 ++++++++++++++----- .../xcschemes/SwiftSMART-OSX.xcscheme | 2 +- .../xcschemes/SwiftSMART-iOS.xcscheme | 2 +- 8 files changed, 28 insertions(+), 14 deletions(-) diff --git a/Info.plist b/Info.plist index 3b440602..e659c173 100644 --- a/Info.plist +++ b/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.3 + 2.3.0 CFBundleSignature ???? CFBundleVersion - 2.2.3.0 + 2.3.0.0 NSPrincipalClass diff --git a/OAuth2 b/OAuth2 index 4013b7b6..8d1a0e15 160000 --- a/OAuth2 +++ b/OAuth2 @@ -1 +1 @@ -Subproject commit 4013b7b637c18f6059a123e893b5382e744d2075 +Subproject commit 8d1a0e15258d3d051fde999ed30a4ba724a07208 diff --git a/README.md b/README.md index 6fed8198..c825593f 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ See the `develop` branch or specific `feature/x` branches for new Swift or FHIR Version | Swift | FHIR |   ---------|-----------|---------------|----------------------------- + **2.3** | 2.3 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.2.3**| 2.2 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.2** | 2.0-2.2 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.1** | 2.0-2.2 | `1.0.1.7108` | DSTU 2 diff --git a/Sources/Client/Auth.swift b/Sources/Client/Auth.swift index c4746fef..a7053c7d 100644 --- a/Sources/Client/Auth.swift +++ b/Sources/Client/Auth.swift @@ -96,7 +96,7 @@ class Auth { // SMART OAuth2 endpoints are at rest[0].security.extension[#].valueUri if let smartauth = security.extensionsFor("http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris")?.first?.extension_fhir { for subext in smartauth where nil != subext.url { - switch subext.url!.absoluteString { + switch subext.url!.absoluteString! { case "authorize": authSettings["authorize_uri"] = subext.valueUri?.absoluteString case "token": diff --git a/Sources/Client/Server.swift b/Sources/Client/Server.swift index 86987afb..c5748c70 100644 --- a/Sources/Client/Server.swift +++ b/Sources/Client/Server.swift @@ -88,7 +88,7 @@ public class Server: FHIROpenServer { - parameter auth: A dictionary with authentication settings, passed on to the `Auth` initializer */ public required init(baseURL base: NSURL, auth: OAuth2JSON? = nil) { - aud = base.absoluteString + aud = base.absoluteString! authSettings = auth super.init(baseURL: base, auth: auth) didSetAuthSettings() diff --git a/SwiftSMART.xcodeproj/project.pbxproj b/SwiftSMART.xcodeproj/project.pbxproj index 5fad35ea..c8c2eaa3 100644 --- a/SwiftSMART.xcodeproj/project.pbxproj +++ b/SwiftSMART.xcodeproj/project.pbxproj @@ -1076,7 +1076,7 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "SMART Health IT"; TargetAttributes = { EE13AA911A5D44D100B901FD = { @@ -1084,9 +1084,11 @@ }; EE43B1A819546D880017679A = { CreatedOnToolsVersion = 6.0; + LastSwiftMigration = 0800; }; EE43B1B219546D880017679A = { CreatedOnToolsVersion = 6.0; + LastSwiftMigration = 0800; TestTargetID = EE43B1A819546D880017679A; }; }; @@ -1570,8 +1572,8 @@ EE13AA9C1A5D44D100B901FD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; COMBINE_HIDPI_IMAGES = YES; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", @@ -1594,10 +1596,10 @@ EE13AA9D1A5D44D100B901FD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; FRAMEWORK_SEARCH_PATHS = ( "$(DEVELOPER_FRAMEWORKS_DIR)", "$(inherited)", @@ -1615,7 +1617,7 @@ EE43B1BD19546D880017679A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1629,6 +1631,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.chip.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = SMART; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1638,7 +1641,7 @@ EE43B1BE19546D880017679A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1652,6 +1655,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.chip.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = SMART; SKIP_INSTALL = YES; + SWIFT_VERSION = 2.3; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1661,7 +1665,7 @@ EE43B1C019546D880017679A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -1673,13 +1677,14 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.chip.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 2.3; }; name = Debug; }; EE43B1C119546D880017679A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -1690,6 +1695,7 @@ METAL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = "org.chip.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 2.3; }; name = Release; }; @@ -1706,8 +1712,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -1715,6 +1723,7 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1750,14 +1759,17 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -1772,6 +1784,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.9; METAL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; diff --git a/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme b/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme index 8d4e5735..b146b8f2 100644 --- a/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme +++ b/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme @@ -1,6 +1,6 @@ Date: Fri, 16 Sep 2016 11:51:50 +0200 Subject: [PATCH 04/17] Swift 3 update --- CHANGELOG.md | 14 +++++++--- OAuth2 | 2 +- README.md | 2 +- Sources/Client/Auth.swift | 6 ++-- Sources/Client/Client.swift | 23 +++++++-------- Sources/Client/PatientListOrder.swift | 6 ++-- Sources/Client/PatientListQuery.swift | 10 +++---- Sources/Client/Server.swift | 40 +++++++++++++-------------- Sources/iOS/PatientList+iOS.swift | 6 ++-- Swift-FHIR | 2 +- SwiftSMART.xcodeproj/project.pbxproj | 22 +++++++++++---- Tests/ServerTests.swift | 2 +- 12 files changed, 76 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49906813..e3dc1914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,20 @@ Changelog ========= -## 2.9 +## 2.8 -- Update to FHIR `1.4.0.8139` +- Update to Swift 3.0 -## 2.8 +## 2.3 -- Update to Swift 3.0 +- Update for Swift 2.3 + + +## 2.2.4 + +- Support resolving bundled references +- Some logging improvements ## 2.2.3 diff --git a/OAuth2 b/OAuth2 index 789ebfa1..a5398439 160000 --- a/OAuth2 +++ b/OAuth2 @@ -1 +1 @@ -Subproject commit 789ebfa1650b603910330608a0a77b1a55ca0da6 +Subproject commit a5398439aa416231e39d51048e04d338318f4c94 diff --git a/README.md b/README.md index f1defb1b..9caeb4f0 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ See the `develop` branch or specific `feature/x` branches for new Swift or FHIR Version | Swift | FHIR |   ---------|-----------|---------------|----------------------------- - **2.9** | 3.0 | `1.4.0.8139` | STU 3 Montreal, May 2016 **2.8** | 3.0 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) + **2.3** | 2.3 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.2.3**| 2.2 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.2** | 2.0-2.2 | `1.0.2.7202` | DSTU 2 (_+ technical errata_) **2.1** | 2.0-2.2 | `1.0.1.7108` | DSTU 2 diff --git a/Sources/Client/Auth.swift b/Sources/Client/Auth.swift index 96dc9294..f39932fc 100644 --- a/Sources/Client/Auth.swift +++ b/Sources/Client/Auth.swift @@ -55,7 +55,7 @@ class Auth { var authContext: AnyObject? /// The closure to call when authorization finishes. - var authCallback: ((parameters: OAuth2JSON?, error: Error?) -> ())? + var authCallback: ((_ parameters: OAuth2JSON?, _ error: Error?) -> ())? /** @@ -176,7 +176,7 @@ class Auth { - parameter withProperties: The authorization properties to use - parameter callback: The callback to call when authorization finishes (or is aborted) */ - func authorize(withProperties properties: SMARTAuthProperties, callback: (parameters: OAuth2JSON?, error: Error?) -> Void) { + func authorize(withProperties properties: SMARTAuthProperties, callback: @escaping (_ parameters: OAuth2JSON?, _ error: Error?) -> Void) { if nil != authCallback { abort() } @@ -265,7 +265,7 @@ class Auth { func processAuthCallback(parameters: OAuth2JSON?, error: Error?) { if nil != authCallback { - authCallback!(parameters: parameters, error: error) + authCallback!(parameters, error) authCallback = nil } } diff --git a/Sources/Client/Client.swift b/Sources/Client/Client.swift index 72b2ee0d..7938e0f9 100644 --- a/Sources/Client/Client.swift +++ b/Sources/Client/Client.swift @@ -113,7 +113,7 @@ public class Client { - parameter callback: The callback to call if the server is ready or an error has occurred */ - public func ready(callback: (error: Error?) -> ()) { + public func ready(callback: @escaping (_ error: Error?) -> ()) { server.ready(callback: callback) } @@ -126,7 +126,7 @@ public class Client { - parameter callback: The callback that is called when authorization finishes, with a patient resource (if launch/patient was specified or an error */ - public func authorize(callback: (patient: Patient?, error: Error?) -> ()) { + public func authorize(callback: @escaping (_ patient: Patient?, _ error: Error?) -> ()) { server.mustAbortAuthorization = false server.authorize(withProperties: self.authProperties, callback: callback) } @@ -139,10 +139,11 @@ public class Client { /** Call this with the redirect URL when intercepting the redirect callback in the app delegate. - - parameter toURL: The URL that was being redirected to + - parameter url: The URL that was being redirected to + - returns: A bool indicating whether the redirect URL was handled */ - public func didRedirect(toURL: URL) -> Bool { - return server.auth?.handleRedirect(toURL) ?? false + public func didRedirect(to url: URL) -> Bool { + return server.auth?.handleRedirect(url) ?? false } /** Stops any request currently in progress. */ @@ -169,10 +170,10 @@ public class Client { - parameter path: The path relative to the server's base URL to request - parameter callback: The callback to execute once the request finishes */ - public func getJSON(_ path: String, callback: ((response: FHIRServerJSONResponse) -> Void)) { + public func getJSON(_ path: String, callback: @escaping ((_ response: FHIRServerJSONResponse) -> Void)) { let handler = FHIRServerJSONRequestHandler(.GET) - server.performRequest(againstPath: path, handler: handler) { response in - callback(response: response as! FHIRServerJSONResponse) + server.performRequest(against: path, handler: handler) { response in + callback(response as! FHIRServerJSONResponse) } } @@ -186,13 +187,13 @@ public class Client { - parameter accept: The accept header to send along - parameter callback: Callback called once the response comes back */ - public func getData(from url: URL, accept: String, callback: ((response: FHIRServerResponse) -> Void)) { + public func getData(from url: URL, accept: String, callback: @escaping ((_ response: FHIRServerResponse) -> Void)) { let handler = FHIRServerDataRequestHandler(.GET, contentType: accept) if nil != url.host { - server.performRequest(withURL: url, handler: handler, callback: callback) + server.performRequest(on: url, handler: handler, callback: callback) } else { - server.performRequest(againstPath: url.path, handler: handler, callback: callback) + server.performRequest(against: url.path, handler: handler, callback: callback) } } } diff --git a/Sources/Client/PatientListOrder.swift b/Sources/Client/PatientListOrder.swift index 32ce5029..81b0e129 100644 --- a/Sources/Client/PatientListOrder.swift +++ b/Sources/Client/PatientListOrder.swift @@ -138,10 +138,10 @@ extension Patient { var comps = calendar.dateComponents([.year, .month], from: birthDate!.nsDate, to: Date()) // babies - if comps.year < 1 { - if comps.month < 1 { + if comps.year! < 1 { + if comps.month! < 1 { comps = calendar.dateComponents([.day], from: birthDate!.nsDate, to: Date()) - if comps.day < 1 { + if comps.day! < 1 { return "just born".fhir_localized } let str = (1 == comps.day) ? "day old".fhir_localized : "days old".fhir_localized diff --git a/Sources/Client/PatientListQuery.swift b/Sources/Client/PatientListQuery.swift index 5f46b01e..bd72199b 100644 --- a/Sources/Client/PatientListQuery.swift +++ b/Sources/Client/PatientListQuery.swift @@ -33,19 +33,19 @@ public class PatientListQuery { isDone = false } - func execute(onServer server: FHIRServer, order: PatientListOrder, callback: (bundle: Bundle?, error: FHIRError?) -> Void) { + func execute(onServer server: FHIRServer, order: PatientListOrder, callback: @escaping (_ bundle: Bundle?, _ error: FHIRError?) -> Void) { if isDone { - callback(bundle: nil, error: nil) + callback(nil, nil) return } - let cb: (bundle: Bundle?, error: FHIRError?) -> Void = { bundle, error in + let cb: (_ bundle: Bundle?, _ error: FHIRError?) -> Void = { bundle, error in if nil != error || nil == bundle { - callback(bundle: nil, error: error) + callback(nil, error) } else { self.isDone = !self.search.hasMore - callback(bundle: bundle, error: nil) + callback(bundle, nil) } } diff --git a/Sources/Client/Server.swift b/Sources/Client/Server.swift index 7728b876..c38d8424 100644 --- a/Sources/Client/Server.swift +++ b/Sources/Client/Server.swift @@ -120,17 +120,17 @@ public class Server: FHIROpenServer { return super.createDefaultSession() } - public override func configurableRequest(forURL url: URL) -> URLRequest { - return auth?.signedRequest(forURL: url) ?? super.configurableRequest(forURL: url) + public override func configurableRequest(for url: URL) -> URLRequest { + return auth?.signedRequest(forURL: url) ?? super.configurableRequest(for: url) } - public override func performPreparedRequest(_ request: URLRequest, withSession session: URLSession, handler: R, callback: ((response: FHIRServerResponse) -> Void)) { + public override func performPreparedRequest(_ request: URLRequest, withSession session: URLSession, handler: R, callback: @escaping ((_ response: FHIRServerResponse) -> Void)) { logger?.debug("SMART", msg: "---> \(request.httpMethod) \(request.url?.description ?? "No URL")") logger?.trace("SMART", msg: "REQUEST\n\(request.debugDescription)\n---") super.performPreparedRequest(request as URLRequest, withSession: session, handler: handler) { response in self.logger?.trace("SMART", msg: "RESPONSE\n\(response.debugDescription)\n---") self.logger?.debug("SMART", msg: "<--- \(response.status) (\(response.body?.count ?? 0) Byte)") - callback(response: response) + callback(response) } } @@ -199,19 +199,19 @@ public class Server: FHIROpenServer { init settings are sufficient (i.e. contain an "authorize_uri" and optionally a "token_uri" and a "client_id" or "registration_uri") or after the conformance statement has been fetched. */ - public func ready(callback: (error: FHIRError?) -> ()) { + public func ready(callback: @escaping (_ error: FHIRError?) -> ()) { if nil != auth || instantiateAuthFromAuthSettings() { - callback(error: nil) + callback(nil) return } // if we haven't initialized the auth instance we likely didn't fetch the server metadata yet getConformance { error in if nil != self.auth { - callback(error: nil) + callback(nil) } else { - callback(error: error ?? FHIRError.error("Failed to detect the authorization method from server metadata")) + callback(error ?? FHIRError.error("Failed to detect the authorization method from server metadata")) } } } @@ -223,35 +223,35 @@ public class Server: FHIROpenServer { - parameter callback: Callback to call when authorization is complete, providing the chosen patient (if the patient scope was provided) or an error, if any */ - public func authorize(withProperties properties: SMARTAuthProperties, callback: ((patient: Patient?, error: Error?) -> Void)) { + public func authorize(withProperties properties: SMARTAuthProperties, callback: @escaping ((_ patient: Patient?, _ error: Error?) -> Void)) { ready() { error in if self.mustAbortAuthorization { self.mustAbortAuthorization = false - callback(patient: nil, error: nil) + callback(nil, nil) } else if nil != error || nil == self.auth { - callback(patient: nil, error: error ?? FHIRError.error("Client error, no auth instance created")) + callback(nil, error ?? FHIRError.error("Client error, no auth instance created")) } else { self.auth!.authorize(withProperties: properties) { parameters, error in if self.mustAbortAuthorization { self.mustAbortAuthorization = false - callback(patient: nil, error: nil) + callback(nil, nil) } else if let error = error { - callback(patient: nil, error: error) + callback(nil, error) } else if let patient = parameters?["patient_resource"] as? Patient { // native patient list auth flow will deliver a Patient instance - callback(patient: patient, error: nil) + callback(patient, nil) } else if let patientId = parameters?["patient"] as? String { Patient.read(patientId, server: self) { resource, error in self.logger?.debug("SMART", msg: "Did read patient \(resource) with error \(error)") - callback(patient: resource as? Patient, error: error) + callback(resource as? Patient, error) } } else { - callback(patient: nil, error: nil) + callback(nil, nil) } } } @@ -290,16 +290,16 @@ public class Server: FHIROpenServer { - parameter callback: The callback to call when completed or failed; if both json and error is nil no registration was attempted */ - public func registerIfNeeded(callback: ((json: OAuth2JSON?, error: Error?) -> Void)) { + public func registerIfNeeded(callback: @escaping ((_ json: OAuth2JSON?, _ error: Error?) -> Void)) { ready() { error in if nil != error || nil == self.auth { - callback(json: nil, error: error ?? FHIRError.error("Client error, no auth instance created")) + callback(nil, error ?? FHIRError.error("Client error, no auth instance created")) } else if let oauth = self.auth?.oauth { - oauth.registerClientIfNeeded(callback) + oauth.registerClientIfNeeded(callback: callback) } else { - callback(json: nil, error: nil) + callback(nil, nil) } } } diff --git a/Sources/iOS/PatientList+iOS.swift b/Sources/iOS/PatientList+iOS.swift index 02283414..1b6aa135 100644 --- a/Sources/iOS/PatientList+iOS.swift +++ b/Sources/iOS/PatientList+iOS.swift @@ -27,7 +27,7 @@ public class PatientListViewController: UITableViewController { } /// Block to execute when a patient has been selected. - var onPatientSelect: ((patient: Patient?) -> Void)? + var onPatientSelect: ((_ patient: Patient?) -> Void)? var didSelectPatientFlag = false @@ -60,7 +60,7 @@ public class PatientListViewController: UITableViewController { let header = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 320.0, height: 30.0)) let label = UILabel() label.translatesAutoresizingMaskIntoConstraints = false - label.font = UIFont.preferredFont(forTextStyle: UIFontTextStyleFootnote) + label.font = UIFont.preferredFont(forTextStyle: .footnote) label.textColor = UIColor.lightGray label.textAlignment = .center @@ -134,7 +134,7 @@ public class PatientListViewController: UITableViewController { func didSelect(patient: Patient?) { didSelectPatientFlag = true - onPatientSelect?(patient: patient) + onPatientSelect?(patient) if !(parent ?? self).isBeingDismissed { dismiss(animated: true) diff --git a/Swift-FHIR b/Swift-FHIR index 44d096bb..903b62b8 160000 --- a/Swift-FHIR +++ b/Swift-FHIR @@ -1 +1 @@ -Subproject commit 44d096bbb5fb5b26e14a8a1390317c7b2d82e169 +Subproject commit 903b62b8e864159d3f9deb827dae8cab10b6ee06 diff --git a/SwiftSMART.xcodeproj/project.pbxproj b/SwiftSMART.xcodeproj/project.pbxproj index 34eb07b1..a672f3fe 100644 --- a/SwiftSMART.xcodeproj/project.pbxproj +++ b/SwiftSMART.xcodeproj/project.pbxproj @@ -30,8 +30,6 @@ EE13CDD61D4A61B9005537E9 /* OAuth2AuthorizerUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE13CDC81D4A61B9005537E9 /* OAuth2AuthorizerUI.swift */; }; EE13CDD71D4A61B9005537E9 /* OAuth2AuthRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE13CDC91D4A61B9005537E9 /* OAuth2AuthRequest.swift */; }; EE13CDD81D4A61B9005537E9 /* OAuth2AuthRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE13CDC91D4A61B9005537E9 /* OAuth2AuthRequest.swift */; }; - EE13CDD91D4A61B9005537E9 /* OAuth2Backing.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE13CDCA1D4A61B9005537E9 /* OAuth2Backing.swift */; }; - EE13CDDA1D4A61B9005537E9 /* OAuth2Backing.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE13CDCA1D4A61B9005537E9 /* OAuth2Backing.swift */; }; EE13CDDB1D4A61B9005537E9 /* OAuth2Base.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE13CDCB1D4A61B9005537E9 /* OAuth2Base.swift */; }; EE13CDDC1D4A61B9005537E9 /* OAuth2Base.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE13CDCB1D4A61B9005537E9 /* OAuth2Base.swift */; }; EE13CDDD1D4A61B9005537E9 /* OAuth2ClientConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE13CDCC1D4A61B9005537E9 /* OAuth2ClientConfig.swift */; }; @@ -318,6 +316,10 @@ EE56A6281ABB6A6F00FA99EB /* ProcessRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE56A6211ABB6A6F00FA99EB /* ProcessRequest.swift */; }; EE56A6291ABB6A6F00FA99EB /* ProcessResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE56A6221ABB6A6F00FA99EB /* ProcessResponse.swift */; }; EE56A62A1ABB6A6F00FA99EB /* ProcessResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE56A6221ABB6A6F00FA99EB /* ProcessResponse.swift */; }; + EE6055CF1D8BDCF5009F905C /* OAuth2Requestable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE6055CB1D8BDCF5009F905C /* OAuth2Requestable.swift */; }; + EE6055D01D8BDCF5009F905C /* OAuth2RequestPerformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE6055CC1D8BDCF5009F905C /* OAuth2RequestPerformer.swift */; }; + EE6055D11D8BDCF5009F905C /* OAuth2Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE6055CD1D8BDCF5009F905C /* OAuth2Response.swift */; }; + EE6055D21D8BDCF5009F905C /* OAuth2Securable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE6055CE1D8BDCF5009F905C /* OAuth2Securable.swift */; }; EE8EE6BF1B1290AA005B90C5 /* OAuth2Authorizer+iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE8EE6BD1B1290AA005B90C5 /* OAuth2Authorizer+iOS.swift */; }; EE8EE6C01B1290AA005B90C5 /* OAuth2WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE8EE6BE1B1290AA005B90C5 /* OAuth2WebViewController.swift */; }; EE8EE6C31B1290B7005B90C5 /* OAuth2Authorizer+macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE8EE6C21B1290B7005B90C5 /* OAuth2Authorizer+macOS.swift */; }; @@ -428,7 +430,6 @@ EE13CDC71D4A61B9005537E9 /* OAuth2AuthConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2AuthConfig.swift; sourceTree = ""; }; EE13CDC81D4A61B9005537E9 /* OAuth2AuthorizerUI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2AuthorizerUI.swift; sourceTree = ""; }; EE13CDC91D4A61B9005537E9 /* OAuth2AuthRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2AuthRequest.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - EE13CDCA1D4A61B9005537E9 /* OAuth2Backing.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Backing.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; EE13CDCB1D4A61B9005537E9 /* OAuth2Base.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Base.swift; sourceTree = ""; }; EE13CDCC1D4A61B9005537E9 /* OAuth2ClientConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2ClientConfig.swift; sourceTree = ""; }; EE13CDCD1D4A61B9005537E9 /* OAuth2DebugURLSessionDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2DebugURLSessionDelegate.swift; sourceTree = ""; }; @@ -581,6 +582,10 @@ EE56A6211ABB6A6F00FA99EB /* ProcessRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessRequest.swift; sourceTree = ""; }; EE56A6221ABB6A6F00FA99EB /* ProcessResponse.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProcessResponse.swift; sourceTree = ""; }; EE56A62C1ABB6D7700FA99EB /* SwiftFHIR.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftFHIR.xcodeproj; path = "Swift-FHIR/SwiftFHIR.xcodeproj"; sourceTree = ""; }; + EE6055CB1D8BDCF5009F905C /* OAuth2Requestable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Requestable.swift; sourceTree = ""; }; + EE6055CC1D8BDCF5009F905C /* OAuth2RequestPerformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2RequestPerformer.swift; sourceTree = ""; }; + EE6055CD1D8BDCF5009F905C /* OAuth2Response.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Response.swift; sourceTree = ""; }; + EE6055CE1D8BDCF5009F905C /* OAuth2Securable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OAuth2Securable.swift; sourceTree = ""; }; EE74D04B195C112300393DCA /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; EE7907B01B1566A100B1B279 /* SMART.podspec */ = {isa = PBXFileReference; lastKnownFileType = file; path = SMART.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; EE8EE6BD1B1290AA005B90C5 /* OAuth2Authorizer+iOS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "OAuth2Authorizer+iOS.swift"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; @@ -667,7 +672,10 @@ isa = PBXGroup; children = ( EE13CDCB1D4A61B9005537E9 /* OAuth2Base.swift */, - EE13CDCA1D4A61B9005537E9 /* OAuth2Backing.swift */, + EE6055CE1D8BDCF5009F905C /* OAuth2Securable.swift */, + EE6055CB1D8BDCF5009F905C /* OAuth2Requestable.swift */, + EE6055CC1D8BDCF5009F905C /* OAuth2RequestPerformer.swift */, + EE6055CD1D8BDCF5009F905C /* OAuth2Response.swift */, EE13CDC71D4A61B9005537E9 /* OAuth2AuthConfig.swift */, EE13CDCC1D4A61B9005537E9 /* OAuth2ClientConfig.swift */, EE13CDCE1D4A61B9005537E9 /* OAuth2Error.swift */, @@ -1229,6 +1237,7 @@ files = ( EE56A5001ABB0B7900FA99EB /* BodySite.swift in Sources */, EE56A5AE1ABB0B7A00FA99EB /* PaymentReconciliation.swift in Sources */, + EE6055CF1D8BDCF5009F905C /* OAuth2Requestable.swift in Sources */, EE56A5241ABB0B7900FA99EB /* Coverage.swift in Sources */, EE56A5C21ABB0B7A00FA99EB /* Quantity.swift in Sources */, EE56A5901ABB0B7900FA99EB /* Money.swift in Sources */, @@ -1275,6 +1284,7 @@ EE56A5861ABB0B7900FA99EB /* MedicationDispense.swift in Sources */, EE56A5AC1ABB0B7A00FA99EB /* PaymentNotice.swift in Sources */, EE01F97A1C591640003AEA7E /* DomainResource+Containment.swift in Sources */, + EE6055D11D8BDCF5009F905C /* OAuth2Response.swift in Sources */, EE13CDE11D4A61B9005537E9 /* OAuth2Error.swift in Sources */, EE56A5BC1ABB0B7A00FA99EB /* ProcedureRequest.swift in Sources */, EE13CDD11D4A61B9005537E9 /* extensions.swift in Sources */, @@ -1328,7 +1338,6 @@ EE56A51A1ABB0B7900FA99EB /* Conformance.swift in Sources */, EE56A5A01ABB0B7A00FA99EB /* Order.swift in Sources */, EE56A6231ABB6A6F00FA99EB /* Claim.swift in Sources */, - EE13CDD91D4A61B9005537E9 /* OAuth2Backing.swift in Sources */, EE56A54C1ABB0B7900FA99EB /* EnrollmentResponse.swift in Sources */, EE56A5B41ABB0B7A00FA99EB /* Person.swift in Sources */, EE56A5FA1ABB0B7A00FA99EB /* VisionPrescription.swift in Sources */, @@ -1342,6 +1351,7 @@ EE56A5381ABB0B7900FA99EB /* Distance.swift in Sources */, EE56A5EC1ABB0B7A00FA99EB /* Subscription.swift in Sources */, EE56A5A21ABB0B7A00FA99EB /* OrderResponse.swift in Sources */, + EE6055D21D8BDCF5009F905C /* OAuth2Securable.swift in Sources */, EE3907C61C3E8287005BFF3D /* FHIRServerResponse.swift in Sources */, EE56A5AA1ABB0B7A00FA99EB /* Patient.swift in Sources */, EE56A5521ABB0B7900FA99EB /* Extension.swift in Sources */, @@ -1370,6 +1380,7 @@ EE8EE6D11B1294AA005B90C5 /* Keychain.swift in Sources */, EE02F8051ACF2FC500179969 /* FamilyMemberHistory.swift in Sources */, EE56A58C1ABB0B7900FA99EB /* MessageHeader.swift in Sources */, + EE6055D01D8BDCF5009F905C /* OAuth2RequestPerformer.swift in Sources */, EE56A58E1ABB0B7900FA99EB /* Meta.swift in Sources */, EE02F8121ACF30B000179969 /* PatientList+iOS.swift in Sources */, EE56A5D21ABB0B7A00FA99EB /* RelatedPerson.swift in Sources */, @@ -1434,7 +1445,6 @@ EE56A5931ABB0B7A00FA99EB /* NamingSystem.swift in Sources */, EE13CDD61D4A61B9005537E9 /* OAuth2AuthorizerUI.swift in Sources */, EE56A5971ABB0B7A00FA99EB /* NutritionOrder.swift in Sources */, - EE13CDDA1D4A61B9005537E9 /* OAuth2Backing.swift in Sources */, EE56A5CF1ABB0B7A00FA99EB /* Reference.swift in Sources */, EE56A54D1ABB0B7900FA99EB /* EnrollmentResponse.swift in Sources */, EE56A62A1ABB6A6F00FA99EB /* ProcessResponse.swift in Sources */, diff --git a/Tests/ServerTests.swift b/Tests/ServerTests.swift index a96b73e2..3fe1cab9 100644 --- a/Tests/ServerTests.swift +++ b/Tests/ServerTests.swift @@ -19,7 +19,7 @@ class ServerTests: XCTestCase { XCTAssertEqual("https://api.io/", server.baseURL.absoluteString) XCTAssertEqual("https://api.io", server.aud) - let metaURL = Bundle(for: self.dynamicType).url(forResource: "metadata", withExtension: "") + let metaURL = Bundle(for: type(of: self)).url(forResource: "metadata", withExtension: "") XCTAssertNotNil(metaURL, "Need file `metadata` for unit tests") let metaData = try? Data(contentsOf: metaURL!) let meta = try JSONSerialization.jsonObject(with: metaData!, options: []) as! FHIRJSON From f4f28db9099e8159f6aa9449f3f2de2e826cd9b0 Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Fri, 16 Sep 2016 12:11:20 +0200 Subject: [PATCH 05/17] Equalize iOS and macOS auth implementations --- Sources/Client/Auth.swift | 4 ++-- Sources/OSX/Auth+OSX.swift | 2 +- Sources/iOS/Auth+iOS.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/Client/Auth.swift b/Sources/Client/Auth.swift index 1ffc1acb..f6855149 100644 --- a/Sources/Client/Auth.swift +++ b/Sources/Client/Auth.swift @@ -214,8 +214,8 @@ class Auth { } oa.scope = scope - // start authorization (method implemented in iOS and OS X extensions) - authorizeWith(oa, properties: properties) + // start authorization (method implemented in iOS and macOS extensions) + authorize(with: oa, properties: properties) } // open server? diff --git a/Sources/OSX/Auth+OSX.swift b/Sources/OSX/Auth+OSX.swift index b8bc6f3e..37a70cba 100644 --- a/Sources/OSX/Auth+OSX.swift +++ b/Sources/OSX/Auth+OSX.swift @@ -12,7 +12,7 @@ import Cocoa extension Auth { /** Show the authorization view controller corresponding to the auth properties. */ - func authorizeWith(_ oauth: OAuth2, properties: SMARTAuthProperties) { + func authorize(with oauth: OAuth2, properties: SMARTAuthProperties) { oauth.authConfig.authorizeContext = authContext oauth.authConfig.authorizeEmbedded = properties.embedded oauth.authConfig.authorizeEmbeddedAutoDismiss = properties.granularity != .patientSelectNative diff --git a/Sources/iOS/Auth+iOS.swift b/Sources/iOS/Auth+iOS.swift index 38a2bf15..73a18e09 100644 --- a/Sources/iOS/Auth+iOS.swift +++ b/Sources/iOS/Auth+iOS.swift @@ -17,7 +17,7 @@ extension Auth { - parameter oauth: The OAuth2 instance to use for authorization - parameter properties: SMART authorization properties to use */ - func authorizeWith(oauth: OAuth2, properties: SMARTAuthProperties) { + func authorize(with oauth: OAuth2, properties: SMARTAuthProperties) { authContext = UIApplication.shared.keyWindow?.rootViewController oauth.authConfig.authorizeContext = authContext From 21d025ff3c2e16a83080ab9dea54682723900327 Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Tue, 27 Sep 2016 15:02:06 +0200 Subject: [PATCH 06/17] =?UTF-8?q?Add=20FHIR=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9caeb4f0..e50184a3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

-Swift-SMART is a full client implementation of the 🔥FHIR specification for building apps that interact with healthcare data through [**SMART on FHIR**](http://docs.smarthealthit.org). +Swift-SMART is a full client implementation of the 🔥FHIR specification for building apps that interact with healthcare data through [**SMART on FHIR**][smart]. Written in _Swift 2_ it is compatible with **iOS 8** and **OS X 10.9** and newer and requires Xcode 7 or newer. @@ -89,7 +89,7 @@ Installation The suggested approach is to add _Swift-SMART_ as a git submodule to your project. Find detailed instructions on how this is done on the [Installation page][installation]. -The framework is also available via _CocoaPods_ under the name [“SMART”][pod]. +The framework can also be installed via _Carthage_ and is also available via _CocoaPods_ under the name [“SMART”][pod]. [installation]: https://github.com/smart-on-fhir/Swift-SMART/wiki/Installation [pod]: https://cocoapods.org/pods/SMART @@ -99,3 +99,6 @@ License ------- This work is [Apache 2](./LICENSE.txt) licensed: [NOTICE.txt](./NOTICE.txt). +FHIR® is the registered trademark of [HL7][] and is used with the permission of HL7. + +[hl7]: http://hl7.org/ From ec2244f52222746185c6f88d4af96b7e5950901c Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Thu, 13 Oct 2016 09:46:42 +0200 Subject: [PATCH 07/17] Make `Server` open to allow subclassing --- Sources/Client/Server.swift | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Sources/Client/Server.swift b/Sources/Client/Server.swift index c38d8424..ded4eb98 100644 --- a/Sources/Client/Server.swift +++ b/Sources/Client/Server.swift @@ -10,18 +10,18 @@ import Foundation /** - Representing the FHIR resource server a client connects to. - - This implementation holds on to an `Auth` instance to handle authentication. It is automatically instantiated with properties from the - settings dictionary provided upon `Client` initalization or from the server's Conformance statement. +Representing the FHIR resource server a client connects to. - The server's `Conformance` statement is automatically downloaded the first time it's needed for various tasks, such as instantiating the - `Auth` instance or validating/executing operations. +This implementation holds on to an `Auth` instance to handle authentication. It is automatically instantiated with properties from the +settings dictionary provided upon `Client` initalization or from the server's Conformance statement. - A server manages its own NSURLSession, either with an optional delegate provided via `sessionDelegate` or simply the system shared - session. Subclasses can change this behavior by overriding `createDefaultSession` or any of the other request-related methods. - */ -public class Server: FHIROpenServer { +The server's `Conformance` statement is automatically downloaded the first time it's needed for various tasks, such as instantiating the +`Auth` instance or validating/executing operations. + +A server manages its own NSURLSession, either with an optional delegate provided via `sessionDelegate` or simply the system shared +session. Subclasses can change this behavior by overriding `createDefaultSession` or any of the other request-related methods. +*/ +open class Server: FHIROpenServer { /// The service URL as a string, as specified during initalization to be used as `aud` parameter. final let aud: String @@ -74,7 +74,7 @@ public class Server: FHIROpenServer { } /// The logger to use. - public var logger: OAuth2Logger? { + open var logger: OAuth2Logger? { didSet { auth?.oauth?.logger = logger } @@ -113,18 +113,18 @@ public class Server: FHIROpenServer { // MARK: - Requests - public override func createDefaultSession() -> URLSession { + open override func createDefaultSession() -> URLSession { if let delegate = sessionDelegate { return Foundation.URLSession(configuration: URLSessionConfiguration.default, delegate: delegate, delegateQueue: nil) } return super.createDefaultSession() } - public override func configurableRequest(for url: URL) -> URLRequest { + open override func configurableRequest(for url: URL) -> URLRequest { return auth?.signedRequest(forURL: url) ?? super.configurableRequest(for: url) } - public override func performPreparedRequest(_ request: URLRequest, withSession session: URLSession, handler: R, callback: @escaping ((_ response: FHIRServerResponse) -> Void)) { + open override func performPreparedRequest(_ request: URLRequest, withSession session: URLSession, handler: R, callback: @escaping ((_ response: FHIRServerResponse) -> Void)) { logger?.debug("SMART", msg: "---> \(request.httpMethod) \(request.url?.description ?? "No URL")") logger?.trace("SMART", msg: "REQUEST\n\(request.debugDescription)\n---") super.performPreparedRequest(request as URLRequest, withSession: session, handler: handler) { response in @@ -137,14 +137,14 @@ public class Server: FHIROpenServer { // MARK: - Server Conformance - public override func didSetConformance(_ conformance: Conformance) { + open override func didSetConformance(_ conformance: Conformance) { if nil == name && nil != conformance.name { name = conformance.name } super.didSetConformance(conformance) } - public override func didFindConformanceRestStatement(_ rest: ConformanceRest) { + open override func didFindConformanceRestStatement(_ rest: ConformanceRest) { super.didFindConformanceRestStatement(rest) // initialize Auth; if we can't find a suitable Auth we'll use one for "no auth" From 0c1483b8063831a67b3913b5bbcb6738930e44d4 Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Mon, 17 Oct 2016 21:10:28 +0200 Subject: [PATCH 08/17] Work on podspec --- .swift-version | 1 + SMART.podspec | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .swift-version diff --git a/.swift-version b/.swift-version new file mode 100644 index 00000000..9f55b2cc --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +3.0 diff --git a/SMART.podspec b/SMART.podspec index d8cce7cc..171db2db 100644 --- a/SMART.podspec +++ b/SMART.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.name = "SMART" - s.version = "2.8.0" + s.version = "2.8.1" s.summary = "Swift SMART on FHIR framework for iOS and OS X" s.description = <<-DESC Swift SMART on FHIR framework for iOS and OS X. @@ -24,12 +24,11 @@ Pod::Spec.new do |s| s.author = { "Pascal Pfiffner" => "phase.of.matter@gmail.com" } s.source = { :git => "https://github.com/smart-on-fhir/Swift-SMART.git", :tag => "#{s.version}", :submodules => true } - s.prepare_command = "git submodule update --init --recursive" # The :submodules flag above is not recursive :P s.ios.deployment_target = "8.0" s.osx.deployment_target = "10.9" - s.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-DNO_MODEL_IMPORT -DNO_KEYCHAIN_IMPORT' } + s.pod_target_xcconfig = { 'OTHER_SWIFT_FLAGS' => '-DNO_MODEL_IMPORT -DNO_MODULE_IMPORT -DNO_KEYCHAIN_IMPORT' } s.source_files = "Sources/Client/*.swift", "Swift-FHIR/Sources/Models/*.swift", "Swift-FHIR/Sources/Client/DomainResource+Containment.swift", @@ -42,9 +41,10 @@ Pod::Spec.new do |s| "Swift-FHIR/Sources/Client/Resource+Instantiation.swift", "Swift-FHIR/Sources/Client/Resource+REST.swift", "OAuth2/SwiftKeychain/Keychain/Keychain.swift", - "OAuth2/Sources/Base/*.swift" + "OAuth2/Sources/Base/*.swift", + "OAuth2/Sources/Flows/*.swift" s.ios.source_files = "Sources/iOS/*.swift", "OAuth2/Sources/iOS/*.swift" s.osx.source_files = "Sources/OSX/*.swift", - "OAuth2/Sources/OSX/*.swift" + "OAuth2/Sources/macOS/*.swift" end From d46f5fd6abb32e77c1d27581580dc42585ff041e Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Mon, 7 Nov 2016 19:01:37 -0500 Subject: [PATCH 09/17] Don't build tests for running, helps with Carthage --- .../xcshareddata/xcschemes/SwiftSMART-iOS.xcscheme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-iOS.xcscheme b/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-iOS.xcscheme index 9ab7b4f4..ed8412b4 100644 --- a/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-iOS.xcscheme +++ b/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-iOS.xcscheme @@ -22,7 +22,7 @@ From 021cfdf6211d22613a7638b127fd7c60d07a2b4d Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Sun, 4 Dec 2016 13:25:40 +0100 Subject: [PATCH 10/17] =?UTF-8?q?Fix=20a=20couple=20of=20=E2=80=9COptional?= =?UTF-8?q?(xy)=E2=80=9D=20occurrences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/Client/PatientListOrder.swift | 8 ++++---- Sources/Client/Server.swift | 2 +- .../xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme | 2 +- .../xcshareddata/xcschemes/SwiftSMART-iOS.xcscheme | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/Client/PatientListOrder.swift b/Sources/Client/PatientListOrder.swift index 81b0e129..497b00a0 100644 --- a/Sources/Client/PatientListOrder.swift +++ b/Sources/Client/PatientListOrder.swift @@ -145,21 +145,21 @@ extension Patient { return "just born".fhir_localized } let str = (1 == comps.day) ? "day old".fhir_localized : "days old".fhir_localized - return "\(comps.day) \(str)" + return "\(comps.day ?? 0) \(str)" } let str = (1 == comps.day) ? "month old".fhir_localized : "months old".fhir_localized - return "\(comps.month) \(str)" + return "\(comps.month ?? 0) \(str)" } // kids and adults if 0 != comps.month { let yr = (1 == comps.year) ? "yr".fhir_localized : "yrs".fhir_localized let mth = (1 == comps.month) ? "mth".fhir_localized : "mths".fhir_localized - return "\(comps.year) \(yr), \(comps.month) \(mth)" + return "\(comps.year ?? 0) \(yr), \(comps.month ?? 0) \(mth)" } let yr = (1 == comps.year) ? "year old".fhir_localized : "years old".fhir_localized - return "\(comps.year) \(yr)" + return "\(comps.year ?? 0) \(yr)" } } diff --git a/Sources/Client/Server.swift b/Sources/Client/Server.swift index ded4eb98..1bfadb02 100644 --- a/Sources/Client/Server.swift +++ b/Sources/Client/Server.swift @@ -125,7 +125,7 @@ open class Server: FHIROpenServer { } open override func performPreparedRequest(_ request: URLRequest, withSession session: URLSession, handler: R, callback: @escaping ((_ response: FHIRServerResponse) -> Void)) { - logger?.debug("SMART", msg: "---> \(request.httpMethod) \(request.url?.description ?? "No URL")") + logger?.debug("SMART", msg: "---> \(request.httpMethod ?? "METHOD") \(request.url?.description ?? "No URL")") logger?.trace("SMART", msg: "REQUEST\n\(request.debugDescription)\n---") super.performPreparedRequest(request as URLRequest, withSession: session, handler: handler) { response in self.logger?.trace("SMART", msg: "RESPONSE\n\(response.debugDescription)\n---") diff --git a/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme b/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme index b146b8f2..fcdf7edc 100644 --- a/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme +++ b/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 15 Dec 2016 12:25:46 +0100 Subject: [PATCH 11/17] Update Swift-FHIR submodule --- Swift-FHIR | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Swift-FHIR b/Swift-FHIR index 903b62b8..6cbf29db 160000 --- a/Swift-FHIR +++ b/Swift-FHIR @@ -1 +1 @@ -Subproject commit 903b62b8e864159d3f9deb827dae8cab10b6ee06 +Subproject commit 6cbf29db75b2a092b0a03f18e5b70c01f70d4d9b From b994d1c3d68392887b3ff5ef06fe8a6623bfad7d Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Thu, 15 Dec 2016 12:45:42 +0100 Subject: [PATCH 12/17] Update Xcode settings --- Swift-FHIR | 2 +- SwiftSMART.xcodeproj/project.pbxproj | 10 +++++++--- .../xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme | 2 +- .../xcshareddata/xcschemes/SwiftSMART-iOS.xcscheme | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Swift-FHIR b/Swift-FHIR index 6cbf29db..4d712209 160000 --- a/Swift-FHIR +++ b/Swift-FHIR @@ -1 +1 @@ -Subproject commit 6cbf29db75b2a092b0a03f18e5b70c01f70d4d9b +Subproject commit 4d712209b9a9bdefa269a1168c17103cc13a435a diff --git a/SwiftSMART.xcodeproj/project.pbxproj b/SwiftSMART.xcodeproj/project.pbxproj index 277f8fe6..59a10e04 100644 --- a/SwiftSMART.xcodeproj/project.pbxproj +++ b/SwiftSMART.xcodeproj/project.pbxproj @@ -1114,7 +1114,7 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = "SMART Health IT"; TargetAttributes = { EE13AA911A5D44D100B901FD = { @@ -1677,7 +1677,7 @@ EE43B1BD19546D880017679A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1701,7 +1701,7 @@ EE43B1BE19546D880017679A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1774,8 +1774,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -1819,8 +1821,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; diff --git a/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme b/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme index fcdf7edc..6fcf6282 100644 --- a/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme +++ b/SwiftSMART.xcodeproj/xcshareddata/xcschemes/SwiftSMART-OSX.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 5 Jan 2017 01:01:53 +0100 Subject: [PATCH 13/17] Update README to fix #3 --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index e50184a3..967cdc83 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,26 @@ smart.authorize() { patient, error in } ``` +For authorization to work with Safari/SFViewController, you also need to: + +1. register the scheme (such as `smartapp` in the example here) in your app's `Info.plist` and +2. intercept the callback in your app delegate, like so: + +```swift +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application(_ app: UIApplication, open url: URL, + options: [UIApplicationOpenURLOptionsKey: Any] = [:]) -> Bool { + + // "smart" is your SMART `Client` instance + if smart.awaitingAuthCallback { + return smart.didRedirect(to: url) + } + return false + } +} +``` + Installation ------------ From c03f72f36c67980c12b880457d406e2cc2d1971a Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Thu, 5 Jan 2017 01:50:58 +0100 Subject: [PATCH 14/17] Update README and Jazzy config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wow, can’t believe the readme still said “Swift 2”! --- .jazzy.yaml | 59 +++++++++++++++++++++++++++++++++++++---------------- README.md | 2 +- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/.jazzy.yaml b/.jazzy.yaml index 4c95f8c2..a99867d1 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -1,12 +1,12 @@ # Jazzy config -module_name: SMART -author_name: SMART Health IT +module: SMART +author: SMART Health IT author_url: http://www.smarthealthit.org root_url: http://smart-on-fhir.github.io/Swift-SMART github_url: https://github.com/smart-on-fhir/Swift-SMART -theme_directory: fullwidth +theme: fullwidth custom_categories: - name: Client children: @@ -14,6 +14,7 @@ custom_categories: - SMARTAuthProperties - SMARTAuthGranularity - FHIRError + - FHIRJSON - FHIRJSONError - FHIRJSONErrorType @@ -22,16 +23,20 @@ custom_categories: - Server - FHIRServer - FHIROpenServer - - FHIRSearch + - FHIRErrorCallback - FHIROperation - FHIROperationContext - - FHIRRequestType - - FHIRServerRequestHandler + - FHIRRequestHeaderField + - FHIRRequestHeaders + - FHIRRequestMethod + - FHIRResourceErrorCallback + - FHIRSearch - FHIRServerDataRequestHandler - - FHIRServerJSONRequestHandler - - FHIRServerResponse - FHIRServerDataResponse + - FHIRServerJSONRequestHandler - FHIRServerJSONResponse + - FHIRServerRequestHandler + - FHIRServerResponse - name: Patient List children: @@ -47,22 +52,40 @@ custom_categories: children: - OAuth2 - OAuth2AuthConfig + - OAuth2AuthRequest + - OAuth2Authorizer + - OAuth2AuthorizerUI + - OAuth2Base - OAuth2ClientConfig - OAuth2ClientCredentials - - OAuth2ImplicitGrant - OAuth2CodeGrant - - OAuth2Request + - OAuth2CodeGrantBasicAuth + - OAuth2ContextStore + - OAuth2DataTaskRequestPerformer + - OAuth2DebugLogger + - OAuth2DebugURLSessionDelegate + - OAuth2DynReg - OAuth2EndpointAuthMethod - - OAuth2WebViewController - - OAuth2Base - OAuth2Error + - OAuth2HTTPContentType + - OAuth2HTTPMethod + - OAuth2Headers + - OAuth2ImplicitGrant + - OAuth2JSON + - OAuth2LogLevel + - OAuth2Logger + - OAuth2PasswordGrant + - OAuth2RequestParams + - OAuth2RequestPerformer + - OAuth2Requestable + - OAuth2Response + - OAuth2Securable + - OAuth2StringDict + - OAuth2WebViewController - name: Keychain children: - Keychain - - KeychainItem - - KeychainService - - KeychainQuery - - BaseKey - - GenericKey - - ArchiveKey + - KeychainItemType + - KeychainServiceType + - KeychainGenericPasswordType diff --git a/README.md b/README.md index 967cdc83..93fa83f6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Swift-SMART is a full client implementation of the 🔥FHIR specification for building apps that interact with healthcare data through [**SMART on FHIR**][smart]. -Written in _Swift 2_ it is compatible with **iOS 8** and **OS X 10.9** and newer and requires Xcode 7 or newer. +Written in _Swift 3_ it is compatible with **iOS 8** and **OS X 10.9** and newer and requires Xcode 8 or newer. ### Versioning From 84ec8e5d09826d2573109a29d634f2ee07ec94fc Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Tue, 31 Jan 2017 23:06:54 +0100 Subject: [PATCH 15/17] Update OAuth2 submodule and adapt --- OAuth2 | 2 +- Sources/Client/Auth.swift | 28 +++++++++++----------------- Sources/Client/Client.swift | 2 +- Sources/OSX/Auth+OSX.swift | 10 ++++++++-- Sources/iOS/Auth+iOS.swift | 10 ++++++++-- 5 files changed, 29 insertions(+), 23 deletions(-) diff --git a/OAuth2 b/OAuth2 index a5398439..b335c983 160000 --- a/OAuth2 +++ b/OAuth2 @@ -1 +1 @@ -Subproject commit a5398439aa416231e39d51048e04d338318f4c94 +Subproject commit b335c98300e12b9d16f5dd22713be1f61c93deb7 diff --git a/Sources/Client/Auth.swift b/Sources/Client/Auth.swift index f6855149..6316ccc9 100644 --- a/Sources/Client/Auth.swift +++ b/Sources/Client/Auth.swift @@ -135,22 +135,14 @@ class Auth { */ func configure(withSettings settings: OAuth2JSON) { switch type { - case .codeGrant: - oauth = OAuth2CodeGrant(settings: settings) - case .implicitGrant: - oauth = OAuth2ImplicitGrant(settings: settings) - case .clientCredentials: - oauth = OAuth2ClientCredentials(settings: settings) - default: - oauth = nil - } - - // configure the OAuth2 instance's callbacks - if let oa = oauth { - // TODO: update - oa.onAuthorize = authDidSucceed - oa.onFailure = authDidFail - oa.logger = server.logger + case .codeGrant: + oauth = OAuth2CodeGrant(settings: settings) + case .implicitGrant: + oauth = OAuth2ImplicitGrant(settings: settings) + case .clientCredentials: + oauth = OAuth2ClientCredentials(settings: settings) + default: + oauth = nil } } @@ -252,7 +244,9 @@ class Auth { } internal func authDidFail(withError error: Error?) { - server.logger?.debug("SMART", msg: "Failed to authorize with error: \(error)") + if let error = error { + server.logger?.debug("SMART", msg: "Failed to authorize with error: \(error)") + } authDidFailInternal(withError: error) processAuthCallback(parameters: nil, error: error) } diff --git a/Sources/Client/Client.swift b/Sources/Client/Client.swift index 7938e0f9..ea936570 100644 --- a/Sources/Client/Client.swift +++ b/Sources/Client/Client.swift @@ -78,7 +78,7 @@ public class Client { - `client_id`: If you have a client-id; otherwise, if the server supports OAuth2 dynamic client registration, will register itself - `redirect`: After-auth redirect URL (string). Must be registered on the server and in your app's Info.plist (URL handler) - `redirect_uris`: Array of redirect URL (strings); will be created if you supply "redirect" - - `scope`: Authorization scope, defaults to "user/ *.* openid profile" plus launch scope, if needed + - `scope`: Authorization scope, defaults to "user/\*.* openid profile" plus launch scope, if needed - `authorize_uri`: Optional; if present will NOT use the authorization endpoints defined in the server's metadata. Know what you do! - `token_uri`: Optional; if present will NOT use the authorization endpoints defined in the server's metadata. Know what you do! - `authorize_type`: Optional; inferred to be "authorization_code" or "implicit". Can also be "client_credentials" for a 2-legged diff --git a/Sources/OSX/Auth+OSX.swift b/Sources/OSX/Auth+OSX.swift index 37a70cba..20c958ff 100644 --- a/Sources/OSX/Auth+OSX.swift +++ b/Sources/OSX/Auth+OSX.swift @@ -16,8 +16,14 @@ extension Auth { oauth.authConfig.authorizeContext = authContext oauth.authConfig.authorizeEmbedded = properties.embedded oauth.authConfig.authorizeEmbeddedAutoDismiss = properties.granularity != .patientSelectNative - // TODO: update - oauth.authorize(params: ["aud": server.aud]) + oauth.authorize(params: ["aud": server.aud]) { json, error in + if let error = error { + self.authDidFail(withError: error) + } + else { + self.authDidSucceed(withParameters: json ?? [:]) + } + } } func authDidFailInternal(withError: Error?) { diff --git a/Sources/iOS/Auth+iOS.swift b/Sources/iOS/Auth+iOS.swift index 73a18e09..e0b5991f 100644 --- a/Sources/iOS/Auth+iOS.swift +++ b/Sources/iOS/Auth+iOS.swift @@ -23,8 +23,14 @@ extension Auth { oauth.authConfig.authorizeContext = authContext oauth.authConfig.authorizeEmbedded = properties.embedded oauth.authConfig.authorizeEmbeddedAutoDismiss = properties.granularity != .patientSelectNative - // TODO: update - oauth.authorize(params: ["aud": server.aud]) + oauth.authorize(params: ["aud": server.aud]) { json, error in + if let error = error { + self.authDidFail(withError: error) + } + else { + self.authDidSucceed(withParameters: json ?? [:]) + } + } } func authDidFailInternal(withError error: Error?) { From 05f6d0d5171985cc5a58209716648902d6dc7e58 Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Tue, 31 Jan 2017 23:07:42 +0100 Subject: [PATCH 16/17] Do not request conformance summary Only for DSTU-2 because rest.security is not included in the summary statement. --- Sources/Client/Server.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/Client/Server.swift b/Sources/Client/Server.swift index 1bfadb02..60bf22f8 100644 --- a/Sources/Client/Server.swift +++ b/Sources/Client/Server.swift @@ -137,6 +137,10 @@ open class Server: FHIROpenServer { // MARK: - Server Conformance + open override func conformancePath() -> String { + return "metadata" + } + open override func didSetConformance(_ conformance: Conformance) { if nil == name && nil != conformance.name { name = conformance.name From d0806379c6bbccc60c22dfa60f4d960092c9ebbc Mon Sep 17 00:00:00 2001 From: Pascal Pfiffner Date: Tue, 31 Jan 2017 23:14:09 +0100 Subject: [PATCH 17/17] Bump to 2.8.2 --- CHANGELOG.md | 10 ++++++++++ Info.plist | 4 ++-- SMART.podspec | 2 +- generate-docs.sh | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3dc1914..e99b9609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ Changelog ========= +## 2.8.2 + +- Do not request summary of `Conformance`, which does not include rest.security + + +## 2.8.1 + +- Make `Server` open to allow subclassing + + ## 2.8 - Update to Swift 3.0 diff --git a/Info.plist b/Info.plist index 9be120c9..c2c2e2a9 100644 --- a/Info.plist +++ b/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.8 + 2.8.2 CFBundleSignature ???? CFBundleVersion - 2.8.0.0 + 2.8.2.0 NSPrincipalClass diff --git a/SMART.podspec b/SMART.podspec index 171db2db..861dcaba 100644 --- a/SMART.podspec +++ b/SMART.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.name = "SMART" - s.version = "2.8.1" + s.version = "2.8.2" s.summary = "Swift SMART on FHIR framework for iOS and OS X" s.description = <<-DESC Swift SMART on FHIR framework for iOS and OS X. diff --git a/generate-docs.sh b/generate-docs.sh index eb84688a..2c771bbf 100755 --- a/generate-docs.sh +++ b/generate-docs.sh @@ -6,7 +6,7 @@ jazzy \ -r "http://smart-on-fhir.github.io/Swift-SMART" \ -o "docs" \ - --module-version "2.8.0" + --module-version "2.8.2" mkdir docs/assets 2>/dev/null cp assets/banner.png docs/assets/