Installation Support Swift Package Manager
joerland2 opened this issue · 2 comments
joerland2 commented
Is there any way that you can adopt this library to support the Swift Package Manager?
3lvis commented
Hi @joerland2,
This might be relevant #225
aasatt commented
To install Networking with SPM on Xcode 11 you need to change the swift-tools-version to 4.2 at the top of Networking's Package.swift file. It's because UIImage.jpegData(compressionQuality: 1)
was introduced in Swift 4.2
// swift-tools-version:4.2
Sample Package.swift with Networking dependency:
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "PackageLibrary",
platforms: [
.iOS(.v13)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "PackageLibrary",
targets: ["PackageLibrary"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(path: "../../Networking/"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "PackageLibrary",
dependencies: ["Networking"]),
.testTarget(
name: "PackageLibraryTests",
dependencies: ["PackageLibrary"]),
]
)