swift-driver version: 1.75.2 Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)
A locally stored package is produced and compiles.
The locally stored package is imported to a Xcode project.
The package (module) shows up in 'Packages' of the project, all files visible
The files shared by the module work well and the project compiles when they are stored in the project's 'Models' group.
However, the compiler throws an error 'No such module ModuleName' at 'import ModuleName' when the package has been added through 'File/Add Packages/Add Local'.
I've read the documentation but can't figure what I am doing wrong.
Random guess, but maybe related to the Clang module verifier that's on by default for new framework targets these days? See Troubleshooting the SDKs
If that doesn't help, it would probably be best to file a report using http://feedbackassistant.apple.com since building in Xcode involves e.g. Xcode's own build system.
Successfully imported a package by following the instructions in the 'Creating Swift Packages' presentation (this helped me understanding a few things, thanks @NeoNacho!).
For the Vapor app, I manually added the package to the package manifest. The 'Add Package' dialog didn't allow adding a package to the Vapor app:
Sure, I pasted the GitHub URL in. I couldn’t select a project and the ‘Copy Dependency’ button did nothing. The only way to leave the dialog was ‘Cancel’. No error messages popped up.
Double-checked on a second machine.
Config: Mac mini M1, macOS 13.5.1, Xcode 14.3.1
Created a new App (SwiftUI) project and get the Add Package Dialog with a 'Add Package' button that actually works. Screenshot below.
Created a new Swift Package project and get the Add Package Dialog with a 'Add Dependency' button that doesn't work and the Add Project picker does't work, too. Screenshot above.