-
Notifications
You must be signed in to change notification settings - Fork 2
/
mobile-config.js
118 lines (107 loc) · 5.77 KB
/
mobile-config.js
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
App.info({
id: 'org.communecter.mobile',
name: 'communecter',
description: 'communecter mobile',
author: 'thomas',
email: '[email protected]',
version: '0.0.34',
buildNumber: '134',
});
App.setPreference('android-targetSdkVersion', '26');
App.setPreference('android-minSdkVersion', '21');
App.configurePlugin('phonegap-plugin-push', {
SENDER_ID: 376774334081,
});
App.configurePlugin('cordova-plugin-customurlscheme', {
URL_SCHEME: 'communecter',
});
App.configurePlugin('net.yoik.cordova.plugins.intentfilter', {
URL_SCHEME: 'https',
HOST_NAME: 'www.communecter.org',
});
App.icons({
android_mdpi: 'ressource/android/mipmap-mdpi/ic_launcher.png',
android_hdpi: 'ressource/android/mipmap-hdpi/ic_launcher.png',
android_xhdpi: 'ressource/android/mipmap-xhdpi/ic_launcher.png',
android_xxhdpi: 'ressource/android/mipmap-xxhdpi/ic_launcher.png',
android_xxxhdpi: 'ressource/android/mipmap-xxxhdpi/ic_launcher.png',
app_store: 'ressource/ios/[email protected]',
ios_spotlight_3x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ios_notification_2x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ios_notification_3x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ipad_app_legacy: 'ressource/ios/AppIcon.appiconset/[email protected]',
ipad_app_legacy_2x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ipad_spotlight_legacy: 'ressource/ios/AppIcon.appiconset/[email protected]',
ipad_spotlight_legacy_2x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ios_notification: 'ressource/ios/AppIcon.appiconset/[email protected]',
iphone_legacy: 'ressource/ios/AppIcon.appiconset/[email protected]',
iphone_legacy_2x: 'ressource/ios/AppIcon.appiconset/[email protected]',
iphone_2x: 'ressource/ios/AppIcon.appiconset/[email protected]',
iphone_3x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ipad: 'ressource/ios/AppIcon.appiconset/Icon-76.png',
ipad_2x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ipad_pro: 'ressource/ios/AppIcon.appiconset/[email protected]',
ios_settings: 'ressource/ios/AppIcon.appiconset/Icon-Small.png',
ios_settings_2x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ios_settings_3x: 'ressource/ios/AppIcon.appiconset/[email protected]',
ios_spotlight: 'ressource/ios/AppIcon.appiconset/Icon-40.png',
ios_spotlight_2x: 'ressource/ios/AppIcon.appiconset/[email protected]',
});
App.launchScreens({
android_mdpi_portrait: 'ressource/android/mipmap-mdpi/background.9.png',
android_hdpi_portrait: 'ressource/android/mipmap-hdpi/background.9.png',
android_xhdpi_portrait: 'ressource/android/mipmap-xhdpi/background.9.png',
android_xxhdpi_portrait: 'ressource/android/mipmap-xxhdpi/background.9.png',
android_xxxhdpi_portrait: 'ressource/android/mipmap-xxxhdpi/background.9.png',
iphone_2x: 'ressource/ios/splash/[email protected]',
iphone5: 'ressource/ios/splash/[email protected]',
iphone6: 'ressource/ios/splash/[email protected]',
iphone6p_portrait: 'ressource/ios/splash/[email protected]',
iphone6p_landscape: 'ressource/ios/splash/[email protected]',
ipad_portrait: 'ressource/ios/splash/Default-Portrait.png',
ipad_portrait_2x: 'ressource/ios/splash/[email protected]',
ipad_landscape: 'ressource/ios/splash/Default-Landscape.png',
iphoneX_portrait: 'ressource/ios/splash/Default-Portrait-1125h.png',
ipad_landscape_2x: 'ressource/ios/splash/[email protected]',
});
/* App.appendToConfig(`<platform name="android">
<resource-file src="google-services.json" target="google-services.json" />
</platform>`); */
App.addResourceFile('google-services.json', 'app/google-services.json', 'android');
App.addResourceFile('GoogleService-Info.plist', 'GoogleService-Info.plist', 'ios');
App.setPreference('StatusBarOverlaysWebView', 'false');
App.setPreference('StatusBarBackgroundColor', '#324553');
App.setPreference('Orientation', 'portrait');
App.appendToConfig(`<platform name="ios">
<config-file platform="ios" target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
<string>Communecter requires your camera for taking pictures</string>
</config-file>
<config-file platform="ios" target="*-Info.plist" parent="NSCameraUsageDescription">
<string>Communecter requires your camera for taking pictures</string>
</config-file>
<config-file platform="ios" target="*-Info.plist" parent="NSLocationUsageDescription">
<string>Your current location is used to show services that are nearby</string>
</config-file>
<config-file platform="ios" target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string>Your current location is used to show services that are nearby</string>
</config-file>
<config-file platform="ios" target="*-Info.plist" parent="NSContactsUsageDescription">
<string>Your current contacts is used to invite your friends who have an email</string>
</config-file>
</platform>`);
App.accessRule('*');
App.accessRule('http://*');
App.accessRule('https://*');
App.accessRule('http://*', { type: 'navigation' });
App.accessRule('https://*', { type: 'navigation' });
App.accessRule('http://qa.communecter.org/*', { type: 'navigation' });
App.accessRule('https://qa.communecter.org/*', { type: 'navigation' });
App.accessRule('http://www.communecter.org/*', { type: 'navigation' });
App.accessRule('https://www.communecter.org/*', { type: 'navigation' });
App.accessRule('https://co-mobile.communecter.org/*');
// App.accessRule('http://localhost*');
App.accessRule('*.openstreetmap.org/*', { type: 'navigation' });
App.accessRule('*.tile.thunderforest.com/*', { type: 'navigation' });
App.accessRule('http://a.tiles.mapbox.com/*', { type: 'navigation' });
App.accessRule('https://api.tiles.mapbox.com/*', { type: 'navigation' });
App.accessRule('https://placeholdit.imgix.net/*', { type: 'navigation' });