-
Notifications
You must be signed in to change notification settings - Fork 18
/
app.config.ts
160 lines (154 loc) · 4.42 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import type { ExpoConfig, ConfigContext } from "expo/config";
import setAppConfigEnv from "./scripts/set-app-config-env.js";
const { appConfig, environment, decreasedVersion } = setAppConfigEnv();
const config = appConfig;
const postPublish = [];
if (environment !== "development") {
postPublish.push({
file: "sentry-expo/upload-sourcemaps",
config: {
setCommit: true,
organization: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
},
});
}
export default (_: ConfigContext): ExpoConfig => {
return {
name: config.name,
description: "The first on-chain and open-source blogging platform for everyone",
slug: "xlog",
version: decreasedVersion,
scheme: config.scheme,
orientation: "portrait",
icon: config.icon,
userInterfaceStyle: "automatic",
hooks: {
postPublish,
},
plugins: [
"react-native-compressor",
[
"expo-image-picker",
{
photosPermission: "Allow $(PRODUCT_NAME) to access your photos so you can select images when posting articles.",
},
],
[
"react-native-vision-camera",
{
cameraPermissionText: "Allow $(PRODUCT_NAME) to access your camera so you can take photos and use them when posting articles.",
enableMicrophonePermission: false,
},
],
[
"expo-build-properties",
{
android: {
compileSdkVersion: 34,
targetSdkVersion: 34,
minSdkVersion: 23,
buildToolsVersion: "34.0.0",
kotlinVersion: "1.8.0",
},
ios: {
deploymentTarget: "13.4",
flipper: true,
},
},
],
[
"expo-media-library",
{
photosPermission: "Allow $(PRODUCT_NAME) to access your photos so you can select images when posting articles.",
savePhotosPermission: "Allow $(PRODUCT_NAME) to save photos so you can store your favorite images when browsing articles.",
isAccessMediaLocationEnabled: true,
},
],
"expo-localization",
[
"expo-location",
{
locationWhenInUsePermission: "Allow $(PRODUCT_NAME) to use your location so you can see articles around you.",
},
],
"sentry-expo",
...process.env.USING_GOOGLE_SERVICES === "true" ? ["@react-native-firebase/app"] : [],
"./plugins/with-react-native-firebase.js",
],
splash: {
image: "./assets/splash-light.png",
resizeMode: "contain",
backgroundColor: "#ffffff",
},
assetBundlePatterns: [
"**/*",
],
updates: {
url: process.env.UPDATES_URL,
},
runtimeVersion: {
policy: "appVersion",
},
ios: {
appStoreUrl: "https://apps.apple.com/app/xlog-on-chain-blogging/id6449499296",
supportsTablet: true,
bundleIdentifier: config.scheme,
infoPlist: {
LSApplicationQueriesSchemes: [
"metamask",
"trust",
"safe",
"rainbow",
"uniswap",
],
},
associatedDomains: [
`applinks:${config.nakedAppHost}`,
`applinks:${config.nakedOIAHost}`,
],
googleServicesFile: config.iosGoogleServicesFile,
},
android: {
playStoreUrl: "https://play.google.com/store/apps/details?id=com.crossbell.xlog",
package: config.scheme,
intentFilters: [
{
action: "VIEW",
autoVerify: true,
data: [
{
scheme: "https",
host: config.nakedAppHost,
pathPrefix: "/",
},
{
scheme: "https",
host: config.nakedOIAHost,
pathPrefix: "/",
},
],
category: ["BROWSABLE", "DEFAULT"],
},
],
googleServicesFile: config.androidGoogleServicesFile,
},
extra: {
WALLET_PROJECT_ID: process.env.WALLET_PROJECT_ID,
INFURA_ID: process.env.INFURA_ID,
CSB_SCAN: process.env.CSB_SCAN,
CSB_XCHAR: process.env.CSB_XCHAR,
SENTRY_DSN: process.env.SENTRY_DSN,
APP_HOST: config.appHost,
NAKED_APP_HOST: config.nakedAppHost,
OIA_HOST: config.oiaHost,
NAKED_OIA_HOST: config.nakedOIAHost,
ENV: environment,
eas: {
projectId: process.env.EXPO_PROJECT_ID,
},
},
owner: process.env.OWNER,
};
};