Skip to content

Commit

Permalink
Update for Swift package manager (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
drdavec authored and xmlmodeling committed Sep 11, 2019
1 parent 3628b19 commit 626ffd1
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

## 4.2

- Update Swift 5.0 package manifest.

## 4.1

- Update to Swift 5.0
Expand Down
31 changes: 25 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
//
// Package.swift
// SwiftFHIR
//
// Created by Pascal Pfiffner on 12/10/15.
// 2015, SMART Platforms.
// Modified by Dave Carlson on 8/6/2019.
//

import PackageDescription

let package = Package(
name: "SwiftFHIR",
targets: [
Target(name: "Models"),
Target(name: "Client", dependencies: [.Target(name: "Models")]),
]
name: "FHIR",
platforms: [
.macOS(.v10_13), .iOS(.v11)
],
products: [
.library(
name: "FHIR",
targets: ["FHIR"]),
],
targets: [
.target(
name: "FHIR",
dependencies: ["Models", "Client"]),
.target(
name: "Models",
dependencies: []),
.target(
name: "Client",
dependencies: ["Models"]),

// Test targets not supported until Swift Packages include resource bundles.
]
)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ See [tags/releases](https://github.com/smart-on-fhir/Swift-FHIR/releases).

Version | Swift | FHIR |  
---------|-----------|---------------|-----------------------------
**4.2**| 5.0 Packages | `4.0.0-a53ec6ee1b` | R4
**4.1**| 5.0 | `4.0.0-a53ec6ee1b` | R4
**4.0**| 4.2 | `4.0.0-a53ec6ee1b` | R4
**3.1**| 3.2 | `3.0.0.11832` | STU 3
Expand Down
2 changes: 1 addition & 1 deletion Sources/Client/FHIRBaseRequestHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ open class FHIRDataRequestHandler: FHIRBaseRequestHandler {

public let contentType: String

init(_ method: FHIRRequestMethod, contentType: String) {
public init(_ method: FHIRRequestMethod, contentType: String) {
self.contentType = contentType
super.init(method, resource: nil)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Client/FHIRMinimalServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ open class FHIRMinimalServer: FHIRServer {
public final let baseURL: URL

/// The active URL session.
var session: URLSession?
public var session: URLSession?


/**
Expand Down Expand Up @@ -154,7 +154,7 @@ open class FHIRMinimalServer: FHIRServer {
return Foundation.URLSession.shared
}

func abortSession() {
public func abortSession() {
if nil != session {
session!.invalidateAndCancel()
session = nil
Expand Down
2 changes: 1 addition & 1 deletion Sources/Client/FHIROpenServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ open class FHIROpenServer: FHIRMinimalServer {
Executes a `read` action against the server's "metadata" path, as returned from `cababilityStatementPath()`, which should return the
cabability statement.
*/
final func getCapabilityStatement(_ callback: @escaping (_ error: FHIRError?) -> ()) {
public final func getCapabilityStatement(_ callback: @escaping (_ error: FHIRError?) -> ()) {
if nil != cabability {
callback(nil)
return
Expand Down
10 changes: 10 additions & 0 deletions Sources/FHIR/SwiftFHIR.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//
// SwiftFHIR.swift
// SwiftFHIR
//
// Created by Dave Carlson on 8/7/19.
// Copyright © 2019 SMART Health IT. All rights reserved.
//

@_exported import Models
@_exported import Client
13 changes: 13 additions & 0 deletions SwiftFHIR.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
B47BEB61221E336A00929C5D /* SubstanceSpecification.swift in Sources */ = {isa = PBXBuildFile; fileRef = B47BEADB221E32AB00929C5D /* SubstanceSpecification.swift */; };
B47BEB62221E336A00929C5D /* TerminologyCapabilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = B47BEADD221E32AB00929C5D /* TerminologyCapabilities.swift */; };
B47BEB63221E336A00929C5D /* VerificationResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = B47BEAEF221E32AD00929C5D /* VerificationResult.swift */; };
B4BDC66422FDADFA00CE4B72 /* SwiftFHIR.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4BDC66322FDADFA00CE4B72 /* SwiftFHIR.swift */; };
B4FA8C23221F025700BD72A1 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = B47BEAEB221E32AC00929C5D /* Expression.swift */; };
B4FA8C24221F025700BD72A1 /* ParameterDefinition.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE6C88C21CB39A6A00ADFF94 /* ParameterDefinition.swift */; };
B4FA8C25221F025700BD72A1 /* UsageContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE31DC691D64AC6200B04BEA /* UsageContext.swift */; };
Expand Down Expand Up @@ -982,6 +983,7 @@
B47BEB01221E32AF00929C5D /* SubstanceAmount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SubstanceAmount.swift; sourceTree = "<group>"; };
B47BEB02221E32AF00929C5D /* MedicinalProductIngredient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MedicinalProductIngredient.swift; sourceTree = "<group>"; };
B47BEB03221E32AF00929C5D /* OrganizationAffiliation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrganizationAffiliation.swift; sourceTree = "<group>"; };
B4BDC66322FDADFA00CE4B72 /* SwiftFHIR.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftFHIR.swift; sourceTree = "<group>"; };
EE01F96F1C58F6AB003AEA7E /* DomainResource+Containment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DomainResource+Containment.swift"; sourceTree = "<group>"; };
EE01F9721C58FC51003AEA7E /* ResourceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResourceTests.swift; sourceTree = "<group>"; };
EE02F5911ACF252000179969 /* Address.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Address.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1327,6 +1329,15 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
B4BDC66222FDADFA00CE4B72 /* FHIR */ = {
isa = PBXGroup;
children = (
B4BDC66322FDADFA00CE4B72 /* SwiftFHIR.swift */,
);
name = FHIR;
path = Sources/FHIR;
sourceTree = "<group>";
};
EE684C1419A789BA00B5A2C0 = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1354,6 +1365,7 @@
EE684C2019A789BA00B5A2C0 /* Sources */ = {
isa = PBXGroup;
children = (
B4BDC66222FDADFA00CE4B72 /* FHIR */,
EE9B31F61ACAD94800980AA9 /* Client */,
EE684C4219A78AEE00B5A2C0 /* Models */,
);
Expand Down Expand Up @@ -2008,6 +2020,7 @@
EE6C88CA1CB39A6A00ADFF94 /* CareTeam.swift in Sources */,
B47BEB22221E32AF00929C5D /* EffectEvidenceSynthesis.swift in Sources */,
B47BEB1A221E32AF00929C5D /* Population.swift in Sources */,
B4BDC66422FDADFA00CE4B72 /* SwiftFHIR.swift in Sources */,
EE02F68F1ACF252000179969 /* MessageHeader.swift in Sources */,
EE02F6231ACF252000179969 /* CodeableConcept.swift in Sources */,
EE02F69F1ACF252000179969 /* OperationOutcome.swift in Sources */,
Expand Down

0 comments on commit 626ffd1

Please sign in to comment.