forked from ton-blockchain/ton-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcapacitor.config.ts
More file actions
76 lines (71 loc) · 2.28 KB
/
capacitor.config.ts
File metadata and controls
76 lines (71 loc) · 2.28 KB
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
import type { CapacitorConfig } from '@capacitor/cli';
import type { KeyboardResize } from '@capacitor/keyboard';
const { APP_ENV = 'production' } = process.env;
const COMMON_PLUGINS = [
'@capacitor-community/bluetooth-le',
'@capacitor-mlkit/barcode-scanning',
'@capacitor/app',
'@capacitor/app-launcher',
'@capacitor/clipboard',
'@capacitor/dialog',
'@capacitor/filesystem',
'@capacitor/haptics',
'@capacitor/keyboard',
'@capacitor/push-notifications',
'@capacitor/share',
'@capacitor/status-bar',
'@capgo/capacitor-native-biometric',
'@capgo/native-audio',
'@mauricewegner/capacitor-navigation-bar',
'@mytonwallet/capacitor-usb-hid',
'@mytonwallet/native-bottom-sheet',
'capacitor-native-settings',
'capacitor-plugin-safe-area',
'capacitor-secure-storage-plugin',
'cordova-plugin-inappbrowser',
];
const IOS_PLUGINS = [
'@capacitor/splash-screen',
];
const config: CapacitorConfig = {
appId: 'org.mytonwallet.app',
appName: 'MyTonWallet',
webDir: 'dist',
server: {
androidScheme: 'https',
hostname: 'mytonwallet.local',
},
android: {
path: 'mobile/android',
includePlugins: COMMON_PLUGINS,
webContentsDebuggingEnabled: APP_ENV !== 'production',
},
ios: {
path: 'mobile/ios',
includePlugins: COMMON_PLUGINS.concat(IOS_PLUGINS),
scheme: 'MyTonWallet',
webContentsDebuggingEnabled: APP_ENV !== 'production',
// This parameter fixes a problem occurring with Capacitor 7. Without it, the Delegated Bottom Sheet steals the
// focus from the main WebView for a second at the application start. This focus behavior broke the app logic that
// expected the main WebView to be focused instead of the Sheet. With the parameter, both the contexts are out of
// focus at the app start, and after ~60ms the main WebView gets the focus, which is ok for the app.
initialFocus: false,
},
plugins: {
SplashScreen: {
launchAutoHide: false,
},
CapacitorHttp: {
enabled: true,
},
PushNotifications: {
presentationOptions: [],
},
Keyboard: {
// Needed to disable the automatic focus scrolling on iOS. The scroll is controlled manually by focusScroll.ts
// for a better focus scroll control.
resize: 'none' as KeyboardResize,
},
},
};
export default config;