CocoaPods / Xcodeproj

Create and modify Xcode projects from Ruby.
http://rubygems.org/gems/xcodeproj
MIT License
2.32k stars 452 forks source link

Scheme name as a build time environment variable #897

Open russellwheatley opened 1 year ago

russellwheatley commented 1 year ago

Is there any way to configure the Xcode project to set the name of the scheme as a build time environment variable? Or some way to pull a value from some configuration file associated with the scheme?

I need to configure the project so the scheme name is retrievable from a build phase script. I don't have the luxury of using the Xcode interface as I am writing a CLI command that configures the user's project.

I've already looked at Xcode build settings environment variables: https://developer.apple.com/documentation/xcode/build-settings-reference

There doesn't appear to be any specific scheme configuration file to get the name.

I thought the EnvironmentVariables solved this problem but it appears it is for the run-time, not for build settings.

Any suggestions would be greatly appreciated! Thanks.