3

Is there a way to run a post-actions script in Xcode only if the project has been run in a particular build configuration (happens in Release, doesn't in Debug).

Much Thanks

XmasRights
  • 1,296
  • 10
  • 19

1 Answers1

15

Yes; in your script the $CONFIGURATION variable will be set:

#!/bin/sh

if [ "$CONFIGURATON" != "Release" ]; then
    exit 0
fi

# Does stuff only in Release build

See this SO question to get a list of other Xcode variables that might interest you.

Community
  • 1
  • 1
trojanfoe
  • 118,129
  • 19
  • 204
  • 237