skip to Main Content

I have been trying to add Swift Package dependency ("wireguard") in my xcode project but it shows the error that
ld: Library not found

I have added it locally with URL path like path///user/Desktop/xyz and from GitHub as well but it shows the same error. I have tried many solution from stack overflow and many other platforms but nothing works.

Please guide me how to add SPM locally in my project
My xcode version is 12.3.
PS I have access to apple developer account and my local package is working fine no errors their.

2

Answers


  1. As it seems you can drag&drop the folder containing your framework project into your apps Xcode project and then link it as target dependency. You can read the full thread in the Swift forum below:

    https://forums.swift.org/t/how-to-add-local-swift-package-as-dependency/26457/31

    Login or Signup to reply.
  2. This is a minor point but important one with drag & drop. When you drag the folder in (that contains the Package.swift file), make sure to drop it on the top level project. Only then did Xcode recognise it as a local package correctly, also overriding the non-local package dependency in the project.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search