Missed some style.
Use xcrun to determine the sdk path.
use -eq instead of -n and initialize to CAN_BUILD_64BIT to "0"