2

I've created a new scheme, and I want to define a constant on that scheme, and on Run Script build phase, I want to execute a custom command. I don't have problems with adding a run script phase and execute a command. But I have trouble with the conditional. I'm effectively following this tutorial:

https://www.parse.com/docs/ios_guide#crashreporting-symbolication/iOS

How do I define a variable only one a scheme, and read that variable on custom script in the if [ ... ] block?

1 Answer 1

1

There's a difference between Configurations (like "Debug" & "Release") and Schemes (which are more broad, specifying the target that's going to be built, the configuration that will be used to build it -- you can select a different configuration for running vs profiling vs archiving, and which tests get run).

So instead of trying to determine the scheme at build time (there used to be a SCHEME_NAME environment variable, that appears to be gone as of Xcode 5), what you should do is create a new configuration (instructions on how to do this can be found here) and then you can define any specific environment variables you wish.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.