I am trying to get the current scheme name and set it as a value in my plist. I am running the following shells script:
/usr/libexec/PlistBuddy -c "Set :SchemeName \"$SCHEME_NAME\"" "$INFOPLIST_FILE"
The result is that the scheme name is an empty string. If i set some constant string it works perfectly. How can i get the current scheme name?
You can't.
From https://developer.apple.com/library/ios/featuredarticles/XcodeConcepts/Concept-Schemes.html:
An Xcode scheme defines a collection of targets to build, a configuration to use when building, and a collection of tests to execute.
So this is purely an Xcode interface feature, and it's not part of the build process.
If you want to know for which build configuration (eg. Debug or Release) you're compiling for though, you can use $CONFIGURATION.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With