SwiftLocalhost icon indicating copy to clipboard operation
SwiftLocalhost copied to clipboard

Support For Swift Package Manager

Open Peter-Schorn opened this issue 5 years ago • 1 comments

It would be really nice if you could add support for the Swift Package Manager. I'm not very familiar with Cocoa Pods and I find SPM to be much simpler.

Peter-Schorn avatar Oct 16 '20 04:10 Peter-Schorn

The following should do the trick, but Criollo needs a new release, because 1.0.1 doesn't include the Package.swift file, so we have to point to master here, which is not nice. Furthermore, Criollo doesn't work with SPM yet, so the following issue https://github.com/thecatalinstan/Criollo/issues/89 needs to be resolved before we can continue here.

// swift-tools-version:5.2
import PackageDescription

let package = Package(
    name: "SwiftLocalhost",
    platforms: [
        .iOS(.v12),
        .macOS(.v10_10),
        .tvOS(.v12)
    ],
    products: [
        .library(
            name: "SwiftLocalhost",
            targets: ["SwiftLocalhost"]
        )
    ],
    dependencies: [
        .package(name:"Criollo", url: "https://github.com/thecatalinstan/Criollo", .branch("master")),
    ],
    targets: [
        .target(
            name: "SwiftLocalhost",
            path: "Source",
            publicHeadersPath: "SwiftLocalhost/"
        ),
        
    ]
)

philipphofmann avatar Dec 03 '21 09:12 philipphofmann