I already have a working Xcode project for a MacOS App. However, I would like to add a Swift framework from Github using Swift Package Manager.
I ran "swift package init" inside the project folder. Then I updated Package.swift file. Then I ran "swift package resolve".
However, it still complains no such module when I try to build.
Since I already have a working project, if I run "swift package generate-xcodeproj", it messes up the folder structure as well as removing the storyboard.
How can I tell Xcode to use the module that swift package manager downloaded into the project?
Thank you!
The generated Xcode project from SPM is different from your app's Xcode project/workspace.
You should generate that Xcode project in another directory eg. "Dependencies".
Then drag it into your app's, and add the linked framework. I have written a full step-by-step.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With