Define Macros in Xcode

很久沒用objc...快忘光...

define.h
// 測試站
//#define APP_FOR_ISOBAR
// 客戶內部測試站
//#define APP_FOR_CLIENT_TEST
// 正式站
#define APP_FOR_RELEASE

#ifdef APP_FOR_ISOBAR
  #define BASE_URL            (@"http://4demo.isobar.com.tw/API/")
#endif

#ifdef APP_FOR_CLIENT_TEST
  // fixed: Xcode "macro redefined" warning
  #undef BASE_URL
  #define BASE_URL          (@"http://192.168.1.1/demo/API/")
#endif

#ifdef APP_FOR_RELEASE
  #undef BASE_URL
  #define BASE_URL        (@"https://demo.isobar.com.tw/api/")
#endif

// through Xcode(simulators and devices)
#if DEBUG
// ...
// distribute app to apple store
#else
// ...
#endif