From 921434f83feda40fd5798916a8edb2e567c57bf0 Mon Sep 17 00:00:00 2001 From: Thomas Krajacic Date: Fri, 11 Oct 2019 16:23:08 +0200 Subject: [PATCH 1/3] Include updated wording about including NIO Transport Services in a project --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9b9ec4b..88bb5b0 100644 --- a/README.md +++ b/README.md @@ -16,18 +16,20 @@ Network.framework is Apple's reference implementation of the [proposed post-sock ## How to Use? -Today, the easiest way to use SwiftNIO Transport Services in an iOS project is through CocoaPods: +NIO Transport Services primarily uses SwiftPM as its build tool, so we recommend using that as well. If you want to depend on NIO Transport Services in your own project, it's as simple as adding a dependencies clause to your Package.swift: - pod 'SwiftNIO', '~> 2.0.0' - pod 'SwiftNIOTransportServices', '~> 1.0.0' + dependencies: [ + .package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.1.1") + ] + +and then adding the NIOTransportServices module to your target dependencies. -You can also use the Swift Package Manager: +If your project is set up as an Xcode project and you're using Xcode 11+, you can add NIO Transport Services as a dependency to your Xcode project by clicking File -> Swift Packages -> Add Package Dependency. In the upcoming dialog, please enter `https://github.com/apple/swift-nio-transport-services.git` and click Next twice. Finally, make sure `NIOTransportServices` is selected and click finish. Now will be able to `import NIOTransportServices` in your project. -``` -swift build -``` +You can also use SwiftNIO Transport Services in an iOS project is through CocoaPods: -and add the project as a sub-project by dragging it into your iOS project and adding the frameworks (such as `NIO.framework`) in 'Build Phases' -> 'Link Binary Libraries'. + pod 'SwiftNIO', '~> 2.0.0' + pod 'SwiftNIOTransportServices', '~> 1.0.0' Do note however that Network.framework requires macOS 10.14+, iOS 12+, or tvOS 12+. From 41d5f7ff23f3fd7481ce15a6741e2bd218f7aafb Mon Sep 17 00:00:00 2001 From: Thomas Krajacic Date: Fri, 11 Oct 2019 16:27:47 +0200 Subject: [PATCH 2/3] Add clause about usage in Xcode 10 --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 88bb5b0..7385f03 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,11 @@ Network.framework is Apple's reference implementation of the [proposed post-sock NIO Transport Services primarily uses SwiftPM as its build tool, so we recommend using that as well. If you want to depend on NIO Transport Services in your own project, it's as simple as adding a dependencies clause to your Package.swift: - dependencies: [ - .package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.1.1") - ] +``` +dependencies: [ + .package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.1.1") +] +``` and then adding the NIOTransportServices module to your target dependencies. @@ -31,8 +33,15 @@ You can also use SwiftNIO Transport Services in an iOS project is through CocoaP pod 'SwiftNIO', '~> 2.0.0' pod 'SwiftNIOTransportServices', '~> 1.0.0' -Do note however that Network.framework requires macOS 10.14+, iOS 12+, or tvOS 12+. +If you want to develop SwiftNIO with Xcode 10, you have to generate an Xcode project: + +``` +swift package generate-xcodeproj +``` +and add the project as a sub-project by dragging it into your iOS project and adding the framework (`NIOTransportServices.framework`) in 'Build Phases' -> 'Link Binary Libraries'. + +Do note however that Network.framework requires macOS 10.14+, iOS 12+, or tvOS 12+. ## Versioning From b7a16d18ab41fb920e93c841987cb011d63b22fb Mon Sep 17 00:00:00 2001 From: Thomas Krajacic Date: Fri, 11 Oct 2019 17:44:33 +0200 Subject: [PATCH 3/3] Update README.md Commit suggestion Co-Authored-By: Cory Benfield --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7385f03..1e0c7da 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ and then adding the NIOTransportServices module to your target dependencies. If your project is set up as an Xcode project and you're using Xcode 11+, you can add NIO Transport Services as a dependency to your Xcode project by clicking File -> Swift Packages -> Add Package Dependency. In the upcoming dialog, please enter `https://github.com/apple/swift-nio-transport-services.git` and click Next twice. Finally, make sure `NIOTransportServices` is selected and click finish. Now will be able to `import NIOTransportServices` in your project. -You can also use SwiftNIO Transport Services in an iOS project is through CocoaPods: +You can also use SwiftNIO Transport Services in an iOS project through CocoaPods: pod 'SwiftNIO', '~> 2.0.0' pod 'SwiftNIOTransportServices', '~> 1.0.0'