-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.ts
67 lines (62 loc) · 1.58 KB
/
app.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import "dotenv/config";
import { ExpoConfig, ConfigContext } from "@expo/config";
enum ENV_ENUM {
PRODUCTION = "production",
PREVIEW = "preview",
DEVELOPMENT = "development",
}
const bundleConfig = {
apiUrl: "https://je-decide-pour-toi-staging.herokuapp.com/api/v1",
name: "Je décide pour toi (Staging)",
bundleId: "com.je-decide-pour-toi.app.preview",
iconPath: "./src/assets/icon-preview.png",
buildNumber: "4",
version: "1.0.3",
};
if (process.env.APP_ENV === ENV_ENUM.PRODUCTION) {
bundleConfig.apiUrl = "https://je-decide-pour-toi.herokuapp.com/api/v1";
bundleConfig.name = "Je décide pour toi";
bundleConfig.bundleId = "com.je-decide-pour-toi.app";
bundleConfig.iconPath = "./src/assets/icon.png";
}
const { apiUrl, version, buildNumber, name, bundleId, iconPath } = bundleConfig;
export default ({ config }: ConfigContext): ExpoConfig => {
return {
...config,
extra: {
apiUrl,
build: buildNumber,
version,
eas: {
projectId: "0a9658f6-2d2f-4bbc-a2d8-7bb808ce8fa6",
},
},
name,
slug: "je-decide-pour-toi",
privacy: "public",
platforms: ["ios", "android"],
version,
orientation: "portrait",
icon: iconPath,
plugins: ["./lib/withSimulatorExcludedArchitecture.ts"],
splash: {
image: "./src/assets/splash.png",
resizeMode: "cover",
backgroundColor: "#2C6465",
},
updates: {
checkAutomatically: "ON_ERROR_RECOVERY",
},
runtimeVersion: buildNumber,
assetBundlePatterns: ["**/*"],
ios: {
buildNumber,
supportsTablet: false,
bundleIdentifier: bundleId,
},
notification: {
icon: iconPath,
color: "#67dee1",
},
};
};