Using Xcode 14.3.1
swift-driver version: 1.75.2 Apple Swift version 5.8.1 (swiftlang-22.214.171.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
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:
Can you elaborate on this? How exactly was "didn't allow" manifested? Did you see an error message and what did it say if so?
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
Is this reproducible for you with the latest Xcode 15 beta?
Haven’t tested yet, will do.
Can’t test because I cannot log into my Apple account in the Sonoma beta VM I installed, thus cannot load Xcode.
But it can easily reproduced:
create a package and push it on GitHub
create a Vapor app and try adding the package through the dialog.
ok, I tested with Xcode 15 beta 8. No difference, can't add a package using the button and have to manually add to the manifest.
Filed a feedback case.
Would you be able to share the FB number here so that we could track it?
The case has been closed but I don’t see any change in Xcode 15 (15A240d).
Can we assume that it is not a bug but intended behaviour?