apple / swift-nio-ssh

SwiftNIO SSH is a programmatic implementation of SSH using SwiftNIO
Apache License 2.0
406 stars 50 forks source link

Fix build on non-macOS Apple platforms #164

Closed simonjbeaumont closed 11 months ago

simonjbeaumont commented 11 months ago

Motivation

When building this project for Apple platforms other than macOS, the build failed for a couple of reasons. First, NIOSSHServer requires Foundation.Process which is only available on macOS. Second, the tests are making use of an CryptoKit API that's only present on iOS 13.2 (and aligned other versions), which is newer than the 13.0 stated in the Package.swift:

error: Cannot find type 'Process' in scope
...
error: 'isValidAuthenticationCode(_:authenticating:using:)' is only available in iOS 13.2 or newer

Modifications

Result

Source and tests can now build on Apple platforms other than macOS.