-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathconfig.xml
193 lines (167 loc) · 12.1 KB
/
config.xml
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<?xml version='1.0' encoding='utf-8'?>
<widget id="uk.co.workingedge.phonegap.plugins.example.customconfig"
version="5.0.0"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Custom config plugin example</name>
<description>An example app that demonstrates use of cordova-custom-config plugin</description>
<author email="dave@workingedge.co.uk" href="http://www.workingedge.co.uk/dave">
Dave Alden
</author>
<content src="index.html" />
<access origin="*" />
<preference name="Fullscreen" value="false" />
<plugin name="cordova-plugin-whitelist" spec="1.0.0" />
<plugin name="cordova-custom-config" spec="*" />
<!-- plugin preferences -->
<preference name="cordova-custom-config-autorestore" value="false" />
<preference name="cordova-custom-config-stoponerror" value="true" />
<preference name="cordova-custom-config-hook" value="after_prepare" />
<preference name="cordova-custom-config-parse_unprefixed" value="false" />
<engine name="android" spec="^7.0.0" />
<platform name="android">
<!-- custom preferences examples -->
<custom-preference name="android-manifest/application/activity/@android:theme" value="@android:style/Theme.Material" />
<custom-preference name="android-manifest/application/activity/@android:windowSoftInputMode" value="stateVisible" />
<custom-preference name="android-manifest/@android:installLocation" value="somewhere" />
<custom-preference name="android-manifest/application/@android:hardwareAccelerated" value="custom" />
<custom-preference name="android-manifest/@android:hardwareAccelerated" value="custom" />
<custom-preference name="android-manifest/application/activity/@android:configChanges" value="orientation" />
<!-- specify activity name -->
<custom-preference name="android-manifest/application/activity[@android:name='MainActivity']/@android:launchMode" value="custom" />
<!-- Delete an element -->
<custom-preference delete="true" name="android-manifest/application/activity[@android:name='DeleteMe']" />
<!-- Delete an element that doesn't exists -->
<custom-preference delete="true" name="android-manifest/application/activity[@android:name='NotPresent']" />
<!-- root-level config-file block -->
<custom-config-file parent="/*" target="AndroidManifest.xml">
<supports-screens android:anyDensity="custom" android:largeScreens="custom" android:normalScreens="custom" android:resizeable="custom" android:smallScreens="custom" android:xlargeScreens="custom" />
<uses-permission android:maxSdkVersion="15" android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<permission android:name="com.mobiledonky.example.push.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<permission android:name="com.mobiledonky.example.push.permission.C2D_TEST" android:protectionLevel="signature" />
</custom-config-file>
<!-- application-level config-file block -->
<custom-config-file parent="./application" target="AndroidManifest.xml">
<activity android:label="@string/title_activity_photo_gps" android:name="com.example.PhotoGpsActivity" android:screenOrientation="portrait" android:windowActionBar="false" />
<activity android:name="com.example.NfcActivity" android:theme="@android:style/Theme.Black.NoTitleBar" />
<receiver android:name="net.donky.core.gcm.DonkyGcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.mobiledonky.example.push" />
</intent-filter>
</receiver>
<receiver android:name="net.donky.core.DonkyBroadcastReceiver">
<intent-filter>
<action android:name="net.donky.core.ACTION_SYNCHRONISE" />
</intent-filter>
</receiver>
<service android:exported="false" android:name="net.donky.core.gcm.DonkyGcmIntentService" />
<service android:exported="false" android:name="net.donky.core.DonkyIntentService" />
<uses-library android:name="android.test.runner" />
<uses-library android:name="android.test.harness" />
<activity android:name="FirstActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="SecondActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</custom-config-file>
<!-- Cordova activity-level config-file block -->
<custom-config-file parent="./application/activity/[@android:name='MainActivity']" target="AndroidManifest.xml">
<intent-filter android:label="custom_1">
<action android:name="android.intent.action.custom_1" />
</intent-filter>
<intent-filter android:label="custom_2">
<action android:name="android.intent.action.custom_2" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="com.example.ex1" android:scheme="ex" />
</intent-filter>
<meta-data android:name="fish" android:value="@string/shark" />
<meta-data android:name="bird" android:value="@string/eagle" />
</custom-config-file>
<!-- Add (rather than overwrite) a config-file block -->
<custom-config-file mode="add" parent="./" target="AndroidManifest.xml">
<application android:name="customApplication" />
</custom-config-file>
</platform>
<engine name="ios" spec="^4.5.4" />
<platform name="ios">
<!-- Set various quote options -->
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-QUOTE_DEFAULT" value="YES" />
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-QUOTE_BOTH" quote="both" value="YES" />
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-QUOTE_KEY" quote="key" value="YES" />
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-QUOTE_VALUE" quote="value" value="YES" />
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-QUOTE_NONE" quote="none" value="YES" />
<!-- Set various buildType options -->
<custom-preference name="ios-XCBuildConfiguration-BUiLD_TYPE_DEFAULT" value="YES" />
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-BUiLD_TYPE_DEBUG" value="YES" />
<custom-preference buildType="release" name="ios-XCBuildConfiguration-BUiLD_TYPE_RELEASE" quote="both" value="YES" />
<!-- Set ENABLE_BITCODE to YES in XCode project file override NO value in /ios/cordova/build.xcconfig -->
<custom-preference name="ios-XCBuildConfiguration-ENABLE_BITCODE" value="YES" />
<!-- Set deploy target SDKs for release and debug builds -->
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-IPHONEOS_DEPLOYMENT_TARGET" value="9.1" />
<custom-preference buildType="release" name="ios-XCBuildConfiguration-IPHONEOS_DEPLOYMENT_TARGET" value="7.0" />
<!-- Quote attribute has no effect in /ios/cordova/*.xcconfig -->
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-QUOTE_BOTH" quote="both" value="YES" xcconfigEnforce="true" />
<!-- Override *.xcconfig -->
<custom-preference name="ios-XCBuildConfiguration-TARGETED_DEVICE_FAMILY" value="1,2,3" />
<!-- Custom code signing profiles (overriding those in /ios/cordova/*.xcconfig -->
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-CODE_SIGN_IDENTITY" value="iPhone Developer: Dave Alden (8VUQ6DYDLL)" xcconfigEnforce="true" />
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-CODE_SIGN_IDENTITY[sdk=iphoneos*]" value="iPhone Developer: Dave Alden (8VUQ6DYDLL)" />
<custom-preference buildType="debug" name="ios-XCBuildConfiguration-CODE_SIGN_IDENTITY[sdk=iphoneos9.1]" value="iPhone Developer: Dave Alden (8VUQ6DYDLL)" />
<custom-preference buildType="release" name="ios-XCBuildConfiguration-CODE_SIGN_IDENTITY" value="iPhone Distribution: Working Edge Ltd (556F3DRHUD)" />
<custom-preference buildType="release" name="ios-XCBuildConfiguration-CODE_SIGN_IDENTITY[sdk=iphoneos*]" value="iPhone Distribution: Working Edge Ltd (556F3DRHUD)" xcconfigEnforce="false" />
<custom-preference buildType="release" name="ios-XCBuildConfiguration-CODE_SIGN_IDENTITY[sdk=iphoneos9.1]" value="iPhone Distribution: Working Edge Ltd (556F3DRHUD)" xcconfigEnforce="true" />
<!-- Call a custom function in xcodefunc -->
<custom-preference func="addResourceFile" name="ios-xcodefunc">
<arg flag="path" type="String" value="www/img/logo.png" />
</custom-preference>
<!-- By default, merge with existing array values -->
<custom-config-file parent="LSApplicationQueriesSchemes" target="*-Info.plist">
<array>
<string>myapp</string>
<string>myapp2</string>
<string>myapp3</string>
</array>
</custom-config-file>
<!-- Explicitly merge with existing array values -->
<custom-config-file mode="merge" parent="UISupportedInterfaceOrientations" platform="ios" target="*-Info.plist">
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</custom-config-file>
<!-- Replace existing values -->
<custom-config-file mode="replace" parent="UISupportedInterfaceOrientations~ipad" platform="ios" target="*-Info.plist">
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</custom-config-file>
<!-- delete a key in the plist -->
<custom-config-file mode="delete" parent="DeleteMyKey" platform="ios" target="*-Info.plist" />
<!-- Set background location mode -->
<custom-config-file parent="UIBackgroundModes" platform="ios" target="*-Info.plist">
<array>
<string>location</string>
</array>
</custom-config-file>
<!-- Set message displayed when app requests constant location updates -->
<custom-config-file parent="NSLocationAlwaysUsageDescription" platform="ios" target="*-Info.plist">
<string>This app requires constant access to your location in order to track your position, even when the screen is off.</string>
</custom-config-file>
<!-- Set message displayed when app requests foreground location updates -->
<custom-config-file parent="NSLocationWhenInUseUsageDescription" platform="ios" target="*-Info.plist">
<string>This app will now only track your location when the screen is on and the app is displayed.</string>
</custom-config-file>
<!-- set custom resources -->
<custom-resource catalog="custom" idiom="universal" scale="1x" src="resources/ios/custom-icons/back@1x.png" type="image" />
<custom-resource catalog="custom" idiom="iphone" scale="2x" src="resources/ios/custom-icons/back@2x.png" type="image" />
<custom-resource catalog="custom" idiom="ipad" scale="3x" src="resources/ios/custom-icons/back@3x.png" type="image" />
</platform>
</widget>