From 38ad9b50b60d1817b0f805238a339db2b33355a3 Mon Sep 17 00:00:00 2001 From: Gematik Date: Thu, 5 Oct 2023 17:27:17 +0200 Subject: [PATCH] Version 5.3.0 --- Cartfile.resolved | 2 +- .../AuthenticateChallengeE256Test.swift | 1 + .../AuthenticateChallengeR2048Test.swift | 1 + ...ChannelTypeExtVersionIntegrationTest.swift | 1 + .../DetermineCardAidIntegrationTest.swift | 1 + ...xtChangeReferenceDataIntegrationTest.swift | 1 + ...angeReferenceDataIntegrationTestCont.swift | 1 + ...ealthCardTypeExtESIGNIntegrationTest.swift | 1 + ...HealthCardTypeExtEfCardAccessIntTest.swift | 2 +- ...eExtResetRetryCounterIntegrationTest.swift | 1 + ...ResetRetryCounterIntegrationTestCont.swift | 1 + .../HealthCardTypeExtVerifyPinTest.swift | 1 + .../KeyAgreementIntegrationTest.swift | 1 + .../OpenSecureSessionIntegrationTest.swift | 1 + .../ReadAutCertificateE256Test.swift | 1 + Mintfile | 2 +- Package.resolved | 77 +++++++++++++++++++ Package.swift | 59 ++++++++++++++ README.md | 4 + ReleaseNotes.md | 10 +++ .../HealthCardType+VerifyPin.swift | 1 + .../NFCCardReaderProvider/Card/NFCCard.swift | 4 + .../Card/NFCCardChannel.swift | 4 + .../Card/NFCISO7816APDU+CommandType.swift | 4 + .../Reader/CoreNFCError.swift | 4 + .../NFCTagReaderSession+Publisher.swift | 4 + Sources/NFCDemo/Resources/Info.plist | 2 +- .../HealthCardTypeExtESIGNTest.swift | 2 + Tests/Util/AnyPublisher+Test.swift | 6 +- Tests/Util/Resources/Util_Info.plist | 22 ++++++ doc/userguide/OHCKIT_GettingStarted.adoc | 4 + project.yml | 65 ++++++++++++---- 32 files changed, 272 insertions(+), 19 deletions(-) create mode 100644 Package.resolved create mode 100644 Package.swift create mode 100644 Tests/Util/Resources/Util_Info.plist diff --git a/Cartfile.resolved b/Cartfile.resolved index bf538ec..1a1357d 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,7 +1,7 @@ github "Quick/Nimble" "v9.2.1" github "SwiftCommon/DataKit" "1.1.0" github "gematik/ASN1Kit" "1.1.0" -github "gematik/OpenSSL-Swift" "4.0.0" +github "gematik/OpenSSL-Swift" "4.1.0" github "gematik/ref-GemCommonsKit" "1.3.0" github "hectr/swift-stream-reader" "0.3.0" github "swiftsocket/SwiftSocket" "2e6ba27140a29fae8a6331ba4463312e0c71a6b0" diff --git a/IntegrationTests/HealthCardControl/AuthenticateChallengeE256Test.swift b/IntegrationTests/HealthCardControl/AuthenticateChallengeE256Test.swift index 3554ce5..65d63c6 100644 --- a/IntegrationTests/HealthCardControl/AuthenticateChallengeE256Test.swift +++ b/IntegrationTests/HealthCardControl/AuthenticateChallengeE256Test.swift @@ -19,6 +19,7 @@ import GemCommonsKit import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class AuthenticateChallengeE256Test: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/AuthenticateChallengeR2048Test.swift b/IntegrationTests/HealthCardControl/AuthenticateChallengeR2048Test.swift index 51fb58a..1d0cd2f 100644 --- a/IntegrationTests/HealthCardControl/AuthenticateChallengeR2048Test.swift +++ b/IntegrationTests/HealthCardControl/AuthenticateChallengeR2048Test.swift @@ -19,6 +19,7 @@ import GemCommonsKit import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class AuthenticateChallengeR2048Test: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/CardChannelTypeExtVersionIntegrationTest.swift b/IntegrationTests/HealthCardControl/CardChannelTypeExtVersionIntegrationTest.swift index b859931..5fe5e8a 100644 --- a/IntegrationTests/HealthCardControl/CardChannelTypeExtVersionIntegrationTest.swift +++ b/IntegrationTests/HealthCardControl/CardChannelTypeExtVersionIntegrationTest.swift @@ -17,6 +17,7 @@ import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class CardChannelTypeExtVersionIntegrationTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/DetermineCardAidIntegrationTest.swift b/IntegrationTests/HealthCardControl/DetermineCardAidIntegrationTest.swift index 0a5a75c..8572140 100644 --- a/IntegrationTests/HealthCardControl/DetermineCardAidIntegrationTest.swift +++ b/IntegrationTests/HealthCardControl/DetermineCardAidIntegrationTest.swift @@ -18,6 +18,7 @@ import Foundation import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class DetermineCardAidIntegrationTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTest.swift b/IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTest.swift index 2b46471..ff8d8ec 100644 --- a/IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTest.swift +++ b/IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTest.swift @@ -18,6 +18,7 @@ import Foundation import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class HealthCardTypeExtChangeReferenceDataIntegrationTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTestCont.swift b/IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTestCont.swift index ff144d4..97eeead 100644 --- a/IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTestCont.swift +++ b/IntegrationTests/HealthCardControl/HealthCardTypeExtChangeReferenceDataIntegrationTestCont.swift @@ -18,6 +18,7 @@ import Foundation import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest // Note: This continuation of `HealthCardTypeExtChangeReferenceDataIntegrationTest` exists to separate diff --git a/IntegrationTests/HealthCardControl/HealthCardTypeExtESIGNIntegrationTest.swift b/IntegrationTests/HealthCardControl/HealthCardTypeExtESIGNIntegrationTest.swift index 58443c5..27867fa 100644 --- a/IntegrationTests/HealthCardControl/HealthCardTypeExtESIGNIntegrationTest.swift +++ b/IntegrationTests/HealthCardControl/HealthCardTypeExtESIGNIntegrationTest.swift @@ -18,6 +18,7 @@ import Foundation import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class HealthCardTypeExtESIGNIntegrationTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/HealthCardTypeExtEfCardAccessIntTest.swift b/IntegrationTests/HealthCardControl/HealthCardTypeExtEfCardAccessIntTest.swift index adb5891..c5ff847 100644 --- a/IntegrationTests/HealthCardControl/HealthCardTypeExtEfCardAccessIntTest.swift +++ b/IntegrationTests/HealthCardControl/HealthCardTypeExtEfCardAccessIntTest.swift @@ -15,10 +15,10 @@ // import CardReaderProviderApi - import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class HealthCardTypeExtEfCardAccessIntTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/HealthCardTypeExtResetRetryCounterIntegrationTest.swift b/IntegrationTests/HealthCardControl/HealthCardTypeExtResetRetryCounterIntegrationTest.swift index 962bea1..f7fcd01 100644 --- a/IntegrationTests/HealthCardControl/HealthCardTypeExtResetRetryCounterIntegrationTest.swift +++ b/IntegrationTests/HealthCardControl/HealthCardTypeExtResetRetryCounterIntegrationTest.swift @@ -18,6 +18,7 @@ import Foundation import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class HealthCardTypeExtResetRetryCounterIntegrationTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/HealthCardTypeExtResetRetryCounterIntegrationTestCont.swift b/IntegrationTests/HealthCardControl/HealthCardTypeExtResetRetryCounterIntegrationTestCont.swift index 20a060b..adbb28d 100644 --- a/IntegrationTests/HealthCardControl/HealthCardTypeExtResetRetryCounterIntegrationTestCont.swift +++ b/IntegrationTests/HealthCardControl/HealthCardTypeExtResetRetryCounterIntegrationTestCont.swift @@ -18,6 +18,7 @@ import Foundation import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest // Note: This continuation of `HealthCardTypeExtResetRetryCounterIntegrationTest` exists to separate the count dependent diff --git a/IntegrationTests/HealthCardControl/HealthCardTypeExtVerifyPinTest.swift b/IntegrationTests/HealthCardControl/HealthCardTypeExtVerifyPinTest.swift index d29a86d..b9ff5e8 100644 --- a/IntegrationTests/HealthCardControl/HealthCardTypeExtVerifyPinTest.swift +++ b/IntegrationTests/HealthCardControl/HealthCardTypeExtVerifyPinTest.swift @@ -18,6 +18,7 @@ import Foundation import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class HealthCardTypeExtVerifyPinTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/KeyAgreementIntegrationTest.swift b/IntegrationTests/HealthCardControl/KeyAgreementIntegrationTest.swift index 643979d..d89259a 100644 --- a/IntegrationTests/HealthCardControl/KeyAgreementIntegrationTest.swift +++ b/IntegrationTests/HealthCardControl/KeyAgreementIntegrationTest.swift @@ -20,6 +20,7 @@ import GemCommonsKit import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class KeyAgreementIntegrationTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/OpenSecureSessionIntegrationTest.swift b/IntegrationTests/HealthCardControl/OpenSecureSessionIntegrationTest.swift index 57153d0..2d7d7b5 100644 --- a/IntegrationTests/HealthCardControl/OpenSecureSessionIntegrationTest.swift +++ b/IntegrationTests/HealthCardControl/OpenSecureSessionIntegrationTest.swift @@ -22,6 +22,7 @@ import GemCommonsKit import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class OpenSecureSessionIntegrationTest: CardSimulationTerminalTestCase { diff --git a/IntegrationTests/HealthCardControl/ReadAutCertificateE256Test.swift b/IntegrationTests/HealthCardControl/ReadAutCertificateE256Test.swift index 3be9a8d..8895195 100644 --- a/IntegrationTests/HealthCardControl/ReadAutCertificateE256Test.swift +++ b/IntegrationTests/HealthCardControl/ReadAutCertificateE256Test.swift @@ -19,6 +19,7 @@ import GemCommonsKit import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class ReadAutCertificateE256Test: CardSimulationTerminalTestCase { diff --git a/Mintfile b/Mintfile index a90c4a2..567f34b 100644 --- a/Mintfile +++ b/Mintfile @@ -1,4 +1,4 @@ realm/SwiftLint@0.43.1 yonaskolb/xcodegen@2.23.1 -Carthage/Carthage@0.38.0 +Carthage/Carthage@0.39.0 nicklockwood/SwiftFormat@0.48.7 \ No newline at end of file diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..bbf6e9e --- /dev/null +++ b/Package.resolved @@ -0,0 +1,77 @@ +{ + "pins" : [ + { + "identity" : "asn1kit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/gematik/ASN1Kit.git", + "state" : { + "revision" : "605113f951fd31c083e66e3197309f42b968d800", + "version" : "1.2.1" + } + }, + { + "identity" : "commandant", + "kind" : "remoteSourceControl", + "location" : "http://github.com/Carthage/Commandant", + "state" : { + "revision" : "a1671cf728db837cf5ec1980a80d276bbba748f6", + "version" : "0.18.0" + } + }, + { + "identity" : "cwlcatchexception", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mattgallagher/CwlCatchException.git", + "state" : { + "revision" : "3b123999de19bf04905bc1dfdb76f817b0f2cc00", + "version" : "2.1.2" + } + }, + { + "identity" : "cwlpreconditiontesting", + "kind" : "remoteSourceControl", + "location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git", + "state" : { + "revision" : "a23ded2c91df9156628a6996ab4f347526f17b6b", + "version" : "2.1.2" + } + }, + { + "identity" : "datakit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SwiftCommon/DataKit.git", + "state" : { + "revision" : "08cc443adbe1103ba36e1c187fa313b8e412ad60", + "version" : "1.1.0" + } + }, + { + "identity" : "nimble", + "kind" : "remoteSourceControl", + "location" : "http://github.com/Quick/Nimble", + "state" : { + "revision" : "c93f16c25af5770f0d3e6af27c9634640946b068", + "version" : "9.2.1" + } + }, + { + "identity" : "openssl-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/gematik/OpenSSL-Swift", + "state" : { + "revision" : "2ff3b2b7745f86eaa6a94c44299dd4f330a0943a", + "version" : "4.1.0" + } + }, + { + "identity" : "ref-gemcommonskit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/gematik/ref-GemCommonsKit", + "state" : { + "revision" : "e19c2961ad48cf8897b679bde109988cf96fbb59", + "version" : "1.3.0" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..ac825d2 --- /dev/null +++ b/Package.swift @@ -0,0 +1,59 @@ +// swift-tools-version: 5.8 + +import PackageDescription + +let package = Package( + name: "Openhealthcardkit", + platforms: [ + .iOS(.v13), + .macOS(.v12) + ], + products: [ + .library( + name: "HealthCardControl", + targets: ["HealthCardControl"]), + .library( + name: "NFCCardReaderProvider", + targets: ["NFCCardReaderProvider"]), + .library( + name: "HealthCardAccess", + targets: ["HealthCardAccess"]), + .library( + name: "CardReaderProviderApi", + targets: ["CardReaderProviderApi"]), + .library( + name: "Helper", + targets: ["Helper"]), + ], + dependencies: [ + .package(url: "https://github.com/SwiftCommon/DataKit.git", from: "1.1.0"), + .package(url: "https://github.com/gematik/ASN1Kit.git", from: "1.2.0"), + .package(url: "https://github.com/gematik/OpenSSL-Swift", from: "4.1.0"), + .package(url: "https://github.com/gematik/ref-GemCommonsKit", from: "1.3.0"), + ], + targets: [ + .target( + name: "NFCCardReaderProvider", + dependencies: ["HealthCardAccess", "Helper", .product(name: "GemCommonsKit", package: "ref-GemCommonsKit"), "DataKit"] + ), + .target( + name: "HealthCardControl", + dependencies: ["HealthCardAccess", "Helper", "OpenSSL-Swift", "DataKit"] + ), + .target( + name: "HealthCardAccess", + dependencies: ["CardReaderAccess", "CardReaderProviderApi", "ASN1Kit", "DataKit"] + ), + .target( + name: "CardReaderAccess", + dependencies: ["CardReaderProviderApi", "Helper"] + ), + .target( + name: "CardReaderProviderApi", + dependencies: ["Helper", .product(name: "GemCommonsKit", package: "ref-GemCommonsKit")] + ), + .target( + name: "Helper" + ), + ] +) diff --git a/README.md b/README.md index 78a75ae..9732f81 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ OpenHealthCardKit requires Swift 5.1. ### Setup for integration +- **Swift Package Manager:** Put this in your `Package.swift`: + + `.package(url: "https://github.com/gematik/ref-OpenHealthCardKit", from: "5.3.0"),` + - **Carthage:** Put this in your `Cartfile`: github "gematik/ref-openHealthCardKit" ~> 5.0 diff --git a/ReleaseNotes.md b/ReleaseNotes.md index d7554f4..08be4c1 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,13 @@ +# Release 5.3.0 + +## Add + + - Package.swift added to project + +## Changed + +- For development include gematik owned dependencies via SPM (instead of Carthage) + # Release 5.2.1 ## Added diff --git a/Sources/HealthCardControl/Authentication/HealthCardType+VerifyPin.swift b/Sources/HealthCardControl/Authentication/HealthCardType+VerifyPin.swift index f14b358..1a09a83 100644 --- a/Sources/HealthCardControl/Authentication/HealthCardType+VerifyPin.swift +++ b/Sources/HealthCardControl/Authentication/HealthCardType+VerifyPin.swift @@ -23,6 +23,7 @@ import Helper /// - SeeAlso: `HealthCardType.verify(pin:type:)` /// - success: when the pin verified as correct /// - failed: when the pin was incorrect +@frozen public enum VerifyPinResponse: Equatable { /// Pin verification succeeded case success diff --git a/Sources/NFCCardReaderProvider/Card/NFCCard.swift b/Sources/NFCCardReaderProvider/Card/NFCCard.swift index 63e862d..24acf6c 100644 --- a/Sources/NFCCardReaderProvider/Card/NFCCard.swift +++ b/Sources/NFCCardReaderProvider/Card/NFCCard.swift @@ -14,6 +14,8 @@ // limitations under the License. // +#if os(iOS) + import CardReaderProviderApi import CoreNFC import DataKit @@ -95,3 +97,5 @@ class NFCCard: CardType { } } } + +#endif diff --git a/Sources/NFCCardReaderProvider/Card/NFCCardChannel.swift b/Sources/NFCCardReaderProvider/Card/NFCCardChannel.swift index 27230d0..683a1ef 100644 --- a/Sources/NFCCardReaderProvider/Card/NFCCardChannel.swift +++ b/Sources/NFCCardReaderProvider/Card/NFCCardChannel.swift @@ -14,6 +14,8 @@ // limitations under the License. // +#if os(iOS) + import CardReaderProviderApi import CoreNFC import DataKit @@ -125,3 +127,5 @@ class NFCCardChannel: CardChannelType { } } } + +#endif diff --git a/Sources/NFCCardReaderProvider/Card/NFCISO7816APDU+CommandType.swift b/Sources/NFCCardReaderProvider/Card/NFCISO7816APDU+CommandType.swift index b886b1f..298349a 100644 --- a/Sources/NFCCardReaderProvider/Card/NFCISO7816APDU+CommandType.swift +++ b/Sources/NFCCardReaderProvider/Card/NFCISO7816APDU+CommandType.swift @@ -14,6 +14,8 @@ // limitations under the License. // +#if os(iOS) + import CardReaderProviderApi import CoreNFC import Foundation @@ -40,3 +42,5 @@ extension NFCISO7816APDU { ) } } + +#endif diff --git a/Sources/NFCCardReaderProvider/Reader/CoreNFCError.swift b/Sources/NFCCardReaderProvider/Reader/CoreNFCError.swift index a72f051..bf2faed 100644 --- a/Sources/NFCCardReaderProvider/Reader/CoreNFCError.swift +++ b/Sources/NFCCardReaderProvider/Reader/CoreNFCError.swift @@ -14,6 +14,8 @@ // limitations under the License. // +#if os(iOS) + import CoreNFC import Foundation @@ -67,3 +69,5 @@ extension Swift.Error { return .unknown(self) } } + +#endif diff --git a/Sources/NFCCardReaderProvider/Reader/NFCTagReaderSession+Publisher.swift b/Sources/NFCCardReaderProvider/Reader/NFCTagReaderSession+Publisher.swift index 99c6dbd..fb4c195 100644 --- a/Sources/NFCCardReaderProvider/Reader/NFCTagReaderSession+Publisher.swift +++ b/Sources/NFCCardReaderProvider/Reader/NFCTagReaderSession+Publisher.swift @@ -14,6 +14,8 @@ // limitations under the License. // +#if os(iOS) + import CardReaderProviderApi import Combine import CoreNFC @@ -261,3 +263,5 @@ extension NFCTagReaderSession.Publisher { } } } + +#endif diff --git a/Sources/NFCDemo/Resources/Info.plist b/Sources/NFCDemo/Resources/Info.plist index 98e5de9..1613a43 100644 --- a/Sources/NFCDemo/Resources/Info.plist +++ b/Sources/NFCDemo/Resources/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.2.2 + 1.2.3 CFBundleVersion $(GEMATIK_BUNDLE_VERSION) GEMATIKSourceVersion diff --git a/Tests/HealthCardControlTests/SecureMessaging/HealthCardTypeExtESIGNTest.swift b/Tests/HealthCardControlTests/SecureMessaging/HealthCardTypeExtESIGNTest.swift index aa58de2..800833d 100644 --- a/Tests/HealthCardControlTests/SecureMessaging/HealthCardTypeExtESIGNTest.swift +++ b/Tests/HealthCardControlTests/SecureMessaging/HealthCardTypeExtESIGNTest.swift @@ -15,10 +15,12 @@ // import CardReaderProviderApi +import Combine import GemCommonsKit import HealthCardAccess @testable import HealthCardControl import Nimble +import Util import XCTest final class HealthCardTypeExtESIGNTest: XCTestCase { diff --git a/Tests/Util/AnyPublisher+Test.swift b/Tests/Util/AnyPublisher+Test.swift index d497063..09ab94c 100644 --- a/Tests/Util/AnyPublisher+Test.swift +++ b/Tests/Util/AnyPublisher+Test.swift @@ -19,11 +19,13 @@ import Foundation import GemCommonsKit extension AnyPublisher { - func test() throws -> Self.Output { + /// Convenience function for testing a Publisher's emitted values + public func test() throws -> Self.Output { try testWithTimeout(timeout: 0) } - func testWithTimeout(timeout millis: Int = 3000, sleep interval: TimeInterval = 0.1) throws -> Self.Output { + /// Convenience function for testing a Publisher's emitted values + public func testWithTimeout(timeout millis: Int = 3000, sleep interval: TimeInterval = 0.1) throws -> Self.Output { var done = false var output: Self.Output? var error: Self.Failure? diff --git a/Tests/Util/Resources/Util_Info.plist b/Tests/Util/Resources/Util_Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/Tests/Util/Resources/Util_Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/doc/userguide/OHCKIT_GettingStarted.adoc b/doc/userguide/OHCKIT_GettingStarted.adoc index 63fa49b..53b6454 100644 --- a/doc/userguide/OHCKIT_GettingStarted.adoc +++ b/doc/userguide/OHCKIT_GettingStarted.adoc @@ -6,6 +6,10 @@ OpenHealthCardKit requires Swift 5.1. === Setup for integration +- **Swift Package Manager:** Put this in your `Package.swift`: + + `.package(url: "https://github.com/gematik/ref-OpenHealthCardKit", from: "5.3.0"),` + - **Carthage:** Put this in your `Cartfile`: github "gematik/ref-openHealthCardKit" ~> 5.0 diff --git a/project.yml b/project.yml index 35668b4..25d44ab 100644 --- a/project.yml +++ b/project.yml @@ -28,7 +28,6 @@ schemes: targets: CardReaderAccess_macOS: test test: - gatherCoverageData: true targets: - CardReaderProviderApiTests_macOS - CardReaderAccessTests_macOS @@ -46,6 +45,18 @@ schemes: - NFCDemoTests packages: + ASN1Kit: + url: https://github.com/gematik/ASN1Kit + majorVersion: 1.2.0 + DataKit: + url: https://github.com/SwiftCommon/DataKit + majorVersion: 1.1.0 + GemCommonsKit: + url: https://github.com/gematik/ref-GemCommonsKit.git + majorVersion: 1.3.0 + OpenSSL-Swift: + url: https://github.com/gematik/OpenSSL-Swift + majorVersion: 4.1.0 SnapshotTesting: url: https://github.com/pointfreeco/swift-snapshot-testing majorVersion: 1.10.0 @@ -71,6 +82,7 @@ targets: TARGETED_DEVICE_FAMILY: 1 SWIFT_VERSION: $(inherited) ALWAYS_SEARCH_USER_PATHS: $(inherited) + CODE_SIGN_ENTITLEMENTS: Sources/NFCDemo/Resources/NFCDemo.entitlements configFiles: Debug: Sources/NFCDemo/Resources/debug.xcconfig Release: Sources/NFCDemo/Resources/release.xcconfig @@ -81,14 +93,15 @@ targets: - NFCDemoTests gatherCoverageData: false dependencies: - - framework: Carthage/Build/DataKit.xcframework - - framework: Carthage/Build/GemCommonsKit.xcframework - target: CardReaderProviderApi_iOS - target: CardReaderAccess_iOS - target: NFCCardReaderProvider - target: Helper_iOS - - framework: Carthage/Build/ASN1Kit.xcframework - - framework: Carthage/Build/OpenSSL.xcframework + - package: ASN1Kit + - package: OpenSSL-Swift + - package: GemCommonsKit + product: GemCommonsKit + - package: DataKit - target: HealthCardAccess_iOS - target: HealthCardControl_iOS - sdk: CoreNFC.framework @@ -114,7 +127,8 @@ targets: info: path: Resources/CardReaderProviderApi_Info.plist dependencies: - - framework: Carthage/Build/GemCommonsKit.xcframework + - package: GemCommonsKit + product: GemCommonsKit - target: Helper_${platform} scheme: testTargets: @@ -152,6 +166,8 @@ targets: - Tests/CardReaderProviderApiTests dependencies: - target: CardReaderProviderApi_${platform} + - package: GemCommonsKit + product: GemCommonsKit - framework: Carthage/Build/Nimble.xcframework CardReaderAccessTests: type: bundle.unit-test @@ -174,8 +190,8 @@ targets: - sdk: Combine.framework - target: CardReaderAccess_${platform} - target: CardReaderProviderApi_${platform} - - framework: Carthage/Build/ASN1Kit.xcframework - - framework: Carthage/Build/DataKit.xcframework + - package: ASN1Kit + - package: DataKit transitivelyLinkDependencies: true scheme: testTargets: @@ -188,11 +204,16 @@ targets: path: Resources/HealthCardAccessTests_Info.plist sources: - path: Tests/HealthCardAccessTests - - path: Tests/Util dependencies: - target: HealthCardAccess_${platform} - - framework: Carthage/Build/ObjCCommonsKit.xcframework + - package: ASN1Kit + - package: DataKit + - package: GemCommonsKit + product: GemCommonsKit + - package: GemCommonsKit + product: ObjCCommonsKit - framework: Carthage/Build/Nimble.xcframework + - target: Util_${platform} HealthCardControl: type: framework platform: [iOS,macOS] @@ -203,7 +224,8 @@ targets: dependencies: - target: HealthCardAccess_${platform} - target: Helper_${platform} - - framework: Carthage/Build/OpenSSL.xcframework + - package: OpenSSL-Swift + - package: DataKit transitivelyLinkDependencies: true scheme: testTargets: @@ -217,10 +239,14 @@ targets: path: Resources/HealthCardControlTests_Info.plist sources: - path: Tests/HealthCardControlTests - - path: Tests/Util dependencies: - target: HealthCardControl_${platform} + - target: Util_${platform} + - package: GemCommonsKit + product: GemCommonsKit + - package: DataKit - framework: Carthage/Build/Nimble.xcframework + - sdk: Combine.framework NFCCardReaderProvider: type: framework platform: iOS @@ -231,7 +257,9 @@ targets: dependencies: - target: HealthCardAccess_iOS - target: Helper_iOS - - framework: Carthage/Build/GemCommonsKit.xcframework + - package: DataKit + - package: GemCommonsKit + product: GemCommonsKit - sdk: CoreNFC.framework scheme: testTargets: @@ -247,5 +275,16 @@ targets: dependencies: - target: NFCCardReaderProvider - framework: Carthage/Build/Nimble.xcframework + Util: + type: framework + platform: [macOS,iOS] + info: + path: Resources/Util_Info.plist + sources: + - Tests/Util + dependencies: + - package: GemCommonsKit + product: GemCommonsKit + - sdk: Combine.framework buildImplicitDependencies: true