I think it would be helpful to check for any existing environment variables for the "Run" scheme.
Each time I include a new package into my project and run
swift package generate-xcodeproj I have to manually go in and add my env vars again.
The exact command I run is actually:
swift package -Xlinker -L/usr/local/lib generate-xcodeproj
This is so I can use MySQL, and I have my database connection details in env vars.
Thanks for reading. I look forward to hearing back!