Go to file
Cory Benfield b0b3ba5e7f Make NIO Transport Services available on watchOS 6 (#47)
Motivation:

With Network.framework becoming available on watchOS, you should now be
able to run your favourite NIO applications on watchOS 6!

Modifications:

Updated availability annotations to allow NIO TS.

Result:

More NIO on more watches
2019-06-06 22:24:27 -07:00
.github Initial commit 2018-07-18 17:11:24 +01:00
Sources Make NIO Transport Services available on watchOS 6 (#47) 2019-06-06 22:24:27 -07:00
Tests/NIOTransportServicesTests Pass Channels down pipeline not NWConnection (#45) 2019-05-22 16:40:48 +01:00
dev Initial commit 2018-07-18 17:11:24 +01:00
scripts Annotate code with availability attributes (#42) 2019-05-10 19:02:02 +01:00
.gitignore Initial commit 2018-07-18 17:11:24 +01:00
CONTRIBUTING.md Initial commit 2018-07-18 17:11:24 +01:00
LICENSE.txt Initial commit 2018-07-18 17:11:24 +01:00
Package.swift Annotate code with availability attributes (#42) 2019-05-10 19:02:02 +01:00
README.md update readme for NIO2 (#34) 2019-03-27 10:01:08 +00:00

README.md

NIO Transport Services

Extensions for SwiftNIO to support Apple platforms as first-class citizens.

About NIO Transport Services

NIO Transport Services is an extension to SwiftNIO that provides first-class support for Apple platforms by using Network.framework to provide network connectivity, and Dispatch to provide concurrency. NIOTS provides an alternative EventLoop, EventLoopGroup, and several alternative Channels and Bootstraps.

In addition to providing first-class support for Apple platforms, NIO Transport Services takes advantage of the richer API of Network.framework to provide more insight into the behaviour of the network than is normally available to NIO applications. This includes the ability to wait for connectivity until a network route is available, as well as all of the extra proxy and VPN support that is built directly into Network.framework.

All regular NIO applications should work just fine with NIO Transport Services, simply by changing the event loops and bootstraps in use.

Why Transport Services?

Network.framework is Apple's reference implementation of the proposed post-sockets API that is currently being worked on by the Transport Services Working Group (taps) of the IETF. To indicate the proposed long-term future of interfaces like Network.framework, we decided to call this module NIOTransportServices. Also, NIONetworkFramework didn't appeal to us much as a name.

How to Use?

Today, the easiest way to use SwiftNIO Transport Services in an iOS project is through CocoaPods:

pod 'SwiftNIO', '~> 2.0.0'
pod 'SwiftNIOTransportServices', '~> 1.0.0'

You can also use the Swift Package Manager:

swift build

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'.

Do note however that Network.framework requires macOS 10.14+, iOS 12+, or tvOS 12+.

Versioning

Just like the rest of the SwiftNIO family, swift-nio-transport-services follows SemVer 2.0.0 with a separate document declaring SwiftNIO's Public API.

swift-nio-transport-services 1.x

swift-nio-transport-services versions 1.x is part of the SwiftNIO 2 family of repositories and does not have any dependencies besides swift-nio, Swift 5, and an Apple OS supporting Network.framework. As the latest version, it lives on the master branch.

To depend on swift-nio-transport-services , put the following in the dependencies of your Package.swift:

.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.0.0"),

swift-nio-transport-services 0.x

The legacy swift-nio-transport-services 0.x is part of the SwiftNIO 1 family of repositories and works with Swift 4.1 and newer. The source code can be found on the swift-nio-transport-services-swift-4-maintenance branch.

Developing NIO Transport Services

For the most part, NIO Transport Services development is as straightforward as any other SwiftPM project. With that said, we do have a few processes that are worth understanding before you contribute. For details, please see CONTRIBUTING.md in this repository.

Please note that all work on NIO Transport Services is covered by the SwiftNIO Code of Conduct.