KJCracks/Clutch — pull request #27 by Tatsh (2014-05-11 14:47:38+00:00)
Title: Adjust CLUTCH_DEBUG

I have changed the project configuration here to allow the user to set CLUTCH_DEBUG with xcodebuild, even if the configuration is set to `Release`. `NDEBUG` is also respected (an Xcode built-in).

Also fixed a code-signing configuration issue in the project file. Stripping and re-code-signing is done later, and now with SDK 7.0 code-signing is a requirement. Set the deployment lower to iOS 6.0.

All of these changes should make Clutch buildable without needing to open Xcode. Compiling with Xcode with *iOS Device* (or your device) picked works out of the box as well.

It is not possible to disable `CLUTCH_DEBUG` when using `-configuration Debug` (or *Debug* build in Xcode) in any case.

```bash
# clone
# cd into Clutch

# Always clean
xcodebuild ONLY_ACTIVE_ARCH=NO -sdk iphoneos7.0 -configuration Release -alltargets clean
# You can always go crazy if you want to
find /var/folders -type d -name 'Clutch_Prefix-*' -exec rm -fR {} \; 2>/dev/null

xcodebuild ONLY_ACTIVE_ARCH=NO -sdk iphoneos7.0 -configuration Release -alltargets CLUTCH_DEBUG=0 # equivalent to next line where CLUTCH_DEBUG is not set
xcodebuild ONLY_ACTIVE_ARCH=NO -sdk iphoneos7.0 -configuration Release -alltargets

# Enable CLUTCH_DEBUG with release
xcodebuild ONLY_ACTIVE_ARCH=NO -sdk iphoneos7.0 -configuration Release CLUTCH_DEBUG=1

# Check if things went right (key was having ONLY_ACTIVE_ARCH=NO)
lipo -info build/Release-iphoneos/Clutch.app/Clutch
```

```
Architectures in the fat file: build/Release-iphoneos/Clutch.app/Clutch are: armv7 armv7s arm64
```