How to use Package Manager - trying to implement Hedwig

196 Views Asked by At

I am trying to add Hedwig Library to my Existing project but i am unable to do so. I added other Libraries through CocoaPods but this one doesn't have it.

I am new to iOS Development and couldn't figure out what to do.

I even read other articles on this (1, 2 and many others) but while reading it I get lost and couldn't understand what to do...

They tell me how to create a new Project but I already have one and I want to add the library to the existing one..

Thanks...

1

There are 1 best solutions below

5
Sung On BEST ANSWER

The documentation is pretty self explanatory @Syed.

It tells you to add the repo to your Package.swift

import PackageDescription

let package = Package(
    name: "YourAwesomeSoftware",
    dependencies: [
        .Package(url: "https://github.com/onevcat/Hedwig.git", 
             majorVersion: 1)
    ]
)

then to execute a swift build

if you're not sure what the Package.swift is, refer to the official DOCs Package Manager Swift