I've got a project which is using Swift Package Manager which I am working on in XCode. It requires some environment variables to be set at runtime, and currently it's a bit tedious to work with since I have to manually edit the scheme to supply these values every time I regenerate the project.
Is there any way to easily automate this? For instance is this possible with xcconfig files or something similar?
Cocoapods does this. It builds a project file and edits an existing project file. I'm not knowledgeable about the details but a little googling leads to a ruby gem called Xcodeproj that appears to do the work.