Problem
I've attempted to add pre-action shell scripts that would switch on/off certain definitions in my .pch file depending on what I was building for.
However, when running a build, nothing happens. I'm not a fluent shell scripter, so the solution may be my incorrect syntax, but Xcode won't tell me anything.
Details
Here's some code:
prefix=${PROJECT_DIR}/${GCC_PREFIX_HEADER}
sed -i 's/source/working/' $prefix
sed -i 's/\/\/#define\ HOCKEYAPP_BUILD/#define\ HOCKEYAPP_BUILD' $prefix
sed -i 's/\/\/#define\ FLURRY_ENABLED/#define\ FLURRY_ENABLED' $prefix
sed -i 's/\/\/#define\ PRODUCTION_BUILD/#define\ PRODUCTION_BUILD' $prefix
I added the first line to test if it would even remove a basic word I know is in the .pch file. It didn't. This leads me to believe that my path is invalid.
I've tried several different variations of the .pch file's path and have failed with all of them, though they all could have been wrong.
Thank you for your help