UNICORN - iOS
define.h
1 //
2 // define.h
3 //
4 // Created by saimushi on 2014/06/03.
5 // Copyright (c) 2014年 shuhei_ohono. All rights reserved.
6 //
7 
8 #ifndef Project_define_h
9 #define Project_define_h
10 
11 
12 /*** ビルド環境定義 ココから ***/
13 
14 // Debug Runマクロ
15 #ifdef DEBUG
16 
17 
18 // Local-Development
19 # ifdef LOCAL
20 # if TARGET_IPHONE_SIMULATOR
21 # define TEST @"1"
22 # define DEPROY_SETTING @"Local-Development Debug Run"
23 # define PROTOCOL @"http"
24 # define DOMAIN_NAME @"localhost"
25 # define URL_BASE @"/workspace/UNICORN-project/lib/FrameworkManager/template/managedocs/api/"
26 # endif
27 // XXX シミュレータ以外はエラー!
28 
29 // Development
30 # elif defined DEV
31 # define TEST @"1"
32 # define DEPROY_SETTING @"Development Debug Run"
33 # define PROTOCOL @"https"
34 # define DOMAIN_NAME @"apitest.unicorn-project.com"
35 # define URL_BASE @"/"
36 
37 // Staging
38 # elif defined STAGING
39 # define DEPROY_SETTING @"Staging Debug Run"
40 # define PROTOCOL @"https"
41 # define DOMAIN_NAME @"apistaging.unicorn-project.com"
42 # define URL_BASE @"/"
43 
44 // Distribution(フラグ無)
45 # else
46 # define DEPROY_SETTING @"Distribution Debug Run"
47 # define PROTOCOL @"https"
48 # define DOMAIN_NAME @"api.unicorn-project.com"
49 # define URL_BASE @"/"
50 
51 # endif
52 
53 
54 // Adhoc Archive(配布ビルド)マクロ
55 #elif defined ADHOC
56 
57 
58 // Development
59 # elif defined DEV
60 # define TEST @"1"
61 # define DEPROY_SETTING @"Development Adhoc Run"
62 # define PROTOCOL @"https"
63 # define DOMAIN_NAME @"apitest.unicorn-project.com"
64 # define URL_BASE @"/"
65 
66 // Staging
67 # if defined STAGING
68 # define DEPROY_SETTING @"Staging Adhoc Run"
69 # define PROTOCOL @"https"
70 # define DOMAIN_NAME @"apistaging.unicorn-project.com"
71 # define URL_BASE @"/"
72 
73 // Distribution(フラグ無)
74 # else
75 # define DEPROY_SETTING @"Distribution Adhoc Run"
76 # define PROTOCOL @"https"
77 # define DOMAIN_NAME @"api.unicorn-project.com"
78 # define URL_BASE @"/"
79 
80 # endif
81 
82 
83 // Release Archive(Releaseビルド)マクロ
84 #else
85 
86 
87 // Distribution Archive(Releaseビルド)
88 # define DEPROY_SETTING @"Distribution Archive Run"
89 # define PROTOCOL @"https"
90 # define DOMAIN_NAME @"api.unicorn-project.com"
91 # define URL_BASE @"/"
92 
93 
94 #endif
95 
96 /*** ビルド環境定義 ココまで ***/
97 
98 
99 // 各種マクロ
100 #define APPDELEGATE ((AppDelegate*)[[UIApplication sharedApplication] delegate])
101 #define RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
102 
103 
104 // デフォルトタイムアウトは短めの20秒に設定しています。
105 #define TIMEOUT 20
106 #define COOKIE_TOKEN_NAME @"token"
107 #define SESSION_CRYPT_KEY @"bdcc54fba7d9856c"
108 #define SESSION_CRYPT_IV @"ccfd172a95aqqd9a"
109 
110 // In-App Purchase用の定義
111 #define SHARED_SECRET @"769bca60ace44eedaa8f2a3d5e02006d"
112 #define COOKIE_TOKEN_NAME @"token"
113 #define SESSION_CRYPT_KEY @"bdcc54fba7d9856c"
114 #define SESSION_CRYPT_IV @"ccfd172a95aqqd9a"
115 #define DEVICE_TOKEN_KEY_NAME @"device_token"
116 
117 // サイズ定義
118 #define navibar_title_size 20
119 
120 // 強制アップデート時にAppStoreに遷移する為のリダイレクトURL
121 #define FORCE_APP_UPDATE_REDIRECT @"RedirectAppStore"
122 
123 #endif