forked from microsoft/react-native-test-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.json
331 lines (331 loc) · 22.7 KB
/
schema.json
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
{
"$defs": {
"appIconSet": {
"type": "object",
"properties": {
"filename": {
"description": "Path to the app icon file.",
"type": "string"
},
"prerendered": {
"description": "Whether the icon already incorporates a shine effect.",
"type": "boolean"
}
},
"required": [
"filename",
"prerendered"
]
},
"apple": {
"type": "object",
"properties": {
"bundleIdentifier": {
"description": "Use this property to set the bundle identifier of the final app bundle. This is the same as setting `PRODUCT_BUNDLE_IDENTIFIER` in Xcode.",
"type": "string"
},
"buildNumber": {
"description": "Similar to [`version`](#version), but is not shown to users. This is a required\nkey for App Store.",
"markdownDescription": "Similar to [`version`](#version), but is not shown to users. This is a required\nkey for App Store.\n\nThe equivalent key in `Info.plist` is\n[`CFBundleVersion`](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion).\n\nIntroduced in\n[1.4.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.4.0).",
"type": "string"
},
"icons": {
"description": "Information about all of the icons used by the app.",
"markdownDescription": "Information about all of the icons used by the app.\n\nIcons for all sizes and scales are generated for you so long as you provide PNGs\nmeasuring 1024x1024 pixels here.\n\nYou can read more about app icons in the\n[Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/foundations/app-icons).\n\nThe equivalent key in `Info.plist` is\n[`CFBundleIcons`](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleicons).\n\nIntroduced in\n[1.6.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.6.0).",
"type": "object",
"properties": {
"primaryIcon": {
"description": "The primary icon for the Home screen and Settings app, among others.",
"markdownDescription": "The primary icon for the Home screen and Settings app, among others.\n\nThe equivalent key in `Info.plist` is\n[`CFBundlePrimaryIcon`](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleicons/cfbundleprimaryicon).",
"allOf": [
{
"$ref": "#/$defs/appIconSet"
}
]
},
"alternateIcons": {
"description": "The primary icon for the Home screen and Settings app, among others.",
"markdownDescription": "The primary icon for the Home screen and Settings app, among others.\n\nThe equivalent key in `Info.plist` is\n[`CFBundleAlternateIcons`](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleicons/cfbundlealternateicons).",
"type": "object",
"additionalProperties": {
"allOf": [
{
"$ref": "#/$defs/appIconSet"
}
],
"type": "object"
}
}
},
"required": [
"primaryIcon"
]
},
"codeSignEntitlements": {
"description": "Specifies the path to a custom\n[Entitlements](https://developer.apple.com/documentation/bundleresources/entitlements)\nfile. The path should be relative to `app.json`.",
"markdownDescription": "Specifies the path to a custom\n[Entitlements](https://developer.apple.com/documentation/bundleresources/entitlements)\nfile. The path should be relative to `app.json`.\n\nThis is the same as setting `CODE_SIGN_ENTITLEMENTS` in Xcode.\n\nIntroduced in\n[0.9.7](https://github.com/microsoft/react-native-test-app/releases/tag/0.9.7).",
"type": "string"
},
"codeSignIdentity": {
"description": "Sets the\n<a href='https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW1'>code\nsigning identity</a> to use when signing code.",
"markdownDescription": "Sets the\n<a href='https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-SW1'>code\nsigning identity</a> to use when signing code.\n\nThis is the same as setting `CODE_SIGN_IDENTITY` in Xcode.\n\nIntroduced in\n[0.9.7](https://github.com/microsoft/react-native-test-app/releases/tag/0.9.7).",
"type": "string"
},
"developmentTeam": {
"description": "Sets the\n<a href='https://help.apple.com/xcode/mac/current/#/dev23aab79b4'>development\nteam</a> that the app should be assigned to.",
"markdownDescription": "Sets the\n<a href='https://help.apple.com/xcode/mac/current/#/dev23aab79b4'>development\nteam</a> that the app should be assigned to.\n\nThis is the same as setting `DEVELOPMENT_TEAM` in Xcode.\n\nIntroduced in\n[0.9.7](https://github.com/microsoft/react-native-test-app/releases/tag/0.9.7).",
"type": "string"
}
}
},
"component": {
"type": "object",
"properties": {
"appKey": {
"description": "The app key passed to `AppRegistry.registerComponent()`.",
"type": "string"
},
"displayName": {
"description": "Name to be displayed on home screen.",
"type": "string"
},
"initialProperties": {
"description": "Properties that should be passed to your component.",
"type": "object"
},
"presentationStyle": {
"description": "The style in which to present your component.",
"type": "string",
"enum": [
"default",
"modal"
]
},
"slug": {
"description": "URL slug that uniquely identifies this component. Used for deep linking.",
"type": "string"
}
},
"required": [
"appKey"
]
},
"manifest": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"displayName": {
"type": "string"
},
"version": {
"description": "The app version shown to users. The required format is three period-separated\nintegers, such as 1.3.11.",
"markdownDescription": "The app version shown to users. The required format is three period-separated\nintegers, such as 1.3.11.\n\n- **Android**: Equivalent to setting\n [`versionName`](https://developer.android.com/studio/publish/versioning#appversioning).\n- **iOS**: This is the same as setting\n [`CFBundleShortVersionString`](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring)\n in `Info.plist`.\n- **macOS**: This is the same as setting\n [`CFBundleShortVersionString`](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring)\n in `Info.plist`.\n- **Windows**: Please see [`windows.appxmanifest`](#windows.appxmanifest) for\n how to use a custom\n [app package manifest](https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/appx-package-manifest)\n instead.\n\nIntroduced in\n[1.4.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.4.0).",
"type": "string"
},
"bundleRoot": {
"description": "Specifies the root of the bundle file name. E.g., if the bundle file is\n`index.[platform].bundle`, `index` is the bundle root.",
"markdownDescription": "Specifies the root of the bundle file name. E.g., if the bundle file is\n`index.[platform].bundle`, `index` is the bundle root.\n\nDefaults to `index` and `main`.\n\nWhen set, the test app will look for the following files on startup:\n\n- `myRoot.[platform].jsbundle`\n- `myRoot.[platform].bundle`\n- `myRoot.native.jsbundle`\n- `myRoot.native.bundle`\n- `myRoot.jsbundle`\n- `myRoot.bundle`\n\nIntroduced in\n[0.9.0](https://github.com/microsoft/react-native-test-app/releases/tag/0.9.0).",
"type": "string"
},
"singleApp": {
"description": "In single-app mode, the component with the specified slug gets launched\nautomatically, essentially behaving as a normal app.",
"markdownDescription": "In single-app mode, the component with the specified slug gets launched\nautomatically, essentially behaving as a normal app.\n\nDefaults to multi-app mode.\n\nFor more details, see [its dedicated page](Single-app-Mode).\n\nIntroduced in\n[1.3.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.3.0).",
"type": "string"
},
"components": {
"description": "All components that should be accessible from the home screen should be declared\nunder this property. Each component must have `appKey` set, i.e. the name that\nyou passed to `AppRegistry.registerComponent`.",
"markdownDescription": "All components that should be accessible from the home screen should be declared\nunder this property. Each component must have `appKey` set, i.e. the name that\nyou passed to `AppRegistry.registerComponent`.\n\n```javascript\nAppRegistry.registerComponent(\"Example\", () => Example);\n```\n\nFor each entry, you can declare additional (optional) properties:\n\n```javascript\n{\n \"components\": [\n {\n // The app key passed to `AppRegistry.registerComponent()`\n \"appKey\": \"Example\",\n\n // [Optional] Name to be displayed on home screen\n \"displayName\": \"App\",\n\n // [Optional] Properties that should be passed to your component\n \"initialProperties\": {\n \"concurrentRoot\": false\n },\n\n // [Optional] The style in which to present your component.\n // Valid values are: \"modal\"\n \"presentationStyle\": \"\",\n\n // [Optional] URL slug that uniquely identifies this component.\n // Used for deep linking.\n \"slug\": \"\"\n }\n ]\n}\n```\n\nIf you're on React Native 0.69 and want to enable\n[Concurrent React](https://reactjs.org/blog/2022/03/29/react-v18.html#what-is-concurrent-react),\nset `\"concurrentRoot\": true` in `initialProperties`.\n\n<a name='android-adding-fragments' />\n\n#### [Android] Adding Fragments\n\nOn Android, you can add fragments to the home screen by using their fully\nqualified class names, e.g. `com.example.app.MyFragment`, as app key:\n\n```javascript\n\"components\": [\n {\n \"appKey\": \"com.example.app.MyFragment\",\n \"displayName\": \"App\"\n }\n]\n```\n\nIf you need to get the `ReactNativeHost` instance within `MyFragment`, you can\nrequest it as a service from the context:\n\n```java\n@Override\n@SuppressLint(\"WrongConstant\")\npublic void onAttach(@NonNull Context context) {\n super.onAttach(context);\n\n ReactNativeHost reactNativeHost = (ReactNativeHost)\n context.getSystemService(\"service:reactNativeHostService\");\n ReactInstanceManager reactInstanceManager =\n reactNativeHost.getReactInstanceManager();\n}\n```\n\n<a name='ios-macos-adding-view-controllers' />\n\n#### [iOS, macOS] Adding View Controllers\n\nOn iOS/macOS, you can have native view controllers on the home screen by using\ntheir Objective-C names as app key (Swift classes can declare Objective-C names\nwith the\n[`@objc`](https://docs.swift.org/swift-book/ReferenceManual/Attributes.html#objc)\nattribute):\n\n```javascript\n\"components\": [\n {\n \"appKey\": \"RTAMyViewController\",\n \"displayName\": \"App\"\n }\n]\n```\n\nThe view controller must implement an initializer that accepts a `RCTBridge`\ninstance:\n\n```objc\n- (nonnull instancetype)initWithBridge:(nonnull RCTBridge *)bridge;\n```",
"type": "array",
"items": {
"$ref": "#/$defs/component"
}
}
},
"required": [
"name",
"displayName"
]
},
"signingConfig": {
"type": "object",
"properties": {
"keyAlias": {
"description": "Use this property to specify the alias of key to use in the store",
"type": "string"
},
"keyPassword": {
"description": "Use this property to specify the password of key in the store",
"type": "string"
},
"storeFile": {
"description": "Use this property to specify the relative file path to the key store file",
"type": "string"
},
"storePassword": {
"description": "Use this property to specify the password of the key store",
"type": "string"
}
},
"required": [
"storeFile"
]
}
},
"allOf": [
{
"$ref": "#/$defs/manifest"
}
],
"type": "object",
"properties": {
"resources": {
"description": "Here you should declare all resources that should be bundled with the app. The\nproperty can be a list of paths to resources:",
"markdownDescription": "Here you should declare all resources that should be bundled with the app. The\nproperty can be a list of paths to resources:\n\n```javascript\n\"resources\": [\n \"dist/assets\",\n \"dist/main.jsbundle\"\n]\n```\n\nOr you can declare platform specific resources using platform names as key:\n\n```javascript\n\"resources\": {\n \"android\": [\n \"dist/res\",\n \"dist/main.android.jsbundle\"\n ],\n \"ios\": [\n \"dist/assets\",\n \"dist/main.ios.jsbundle\"\n ],\n \"macos\": [\n \"dist/assets\",\n \"dist/main.macos.jsbundle\"\n ],\n \"windows\": [\n \"dist/assets\",\n \"dist/main.windows.bundle\"\n ]\n}\n```\n\nA path must be relative to the path of `app.json`, and can point to both a file\nor a directory.",
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
{
"type": "object",
"properties": {
"android": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"ios": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"macos": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"windows": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
}
}
]
},
"android": {
"description": "Android specific properties go here.",
"type": "object",
"properties": {
"package": {
"description": "Use this property to set the <a href='https://developer.android.com/studio/build/application-id'>application ID</a> of the APK. The value is set to `applicationId` in `build.gradle`.",
"type": "string"
},
"versionCode": {
"description": "A positive integer used as an internal version number. Google uses this number\nto determine whether one version is more recent than another. See\n[Version your app](https://developer.android.com/studio/publish/versioning#appversioning)\nfor more on how it is used and how it differs from [`version`](#version).",
"markdownDescription": "A positive integer used as an internal version number. Google uses this number\nto determine whether one version is more recent than another. See\n[Version your app](https://developer.android.com/studio/publish/versioning#appversioning)\nfor more on how it is used and how it differs from [`version`](#version).\n\nIntroduced in\n[1.4.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.4.0).",
"type": "number"
},
"icons": {
"description": "Path to resources folder containing launcher icons for the app.",
"markdownDescription": "Path to resources folder containing launcher icons for the app.\n\nIf you're configuring icons for the first time, set this property to the path\nwhere you want to store your icons, then use\n[Image Asset Studio](https://developer.android.com/studio/write/image-asset-studio#access)\nto generate the assets.\n\nYou can read more about Android adaptive icons in the\n[Android documentation](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive).\n\nIntroduced in\n[1.6.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.6.0).",
"type": "string"
},
"signingConfigs": {
"description": "Use this to set the\n<a href='https://developer.android.com/studio/publish/app-signing'>signing\nconfigurations</a> for the app.",
"markdownDescription": "Use this to set the\n<a href='https://developer.android.com/studio/publish/app-signing'>signing\nconfigurations</a> for the app.\n\nThe JSON schema follows the Gradle DSL very closely. Below is what one would add\nfor the debug and release flavors:\n\n```javascript\n{\n \"android\": {\n \"signingConfigs\": {\n \"debug\": { // optional\n \"keyAlias\": \"androiddebugkey\", // defaults to \"androiddebugkey\"\n \"keyPassword\": \"android\", // defaults to \"android\n \"storeFile\": \"debug.keystore\", // required\n \"storePassword\": \"android\" // defaults to \"android\n },\n \"release\": { // optional\n \"keyAlias\": \"androiddebugkey\", // defaults to \"androiddebugkey\"\n \"keyPassword\": \"android\", // defaults to \"android\n \"storeFile\": \"release.keystore\", // required\n \"storePassword\": \"android\" // defaults to \"android\n }\n }\n }\n}\n```\n\nIntroduced in\n[0.11.0](https://github.com/microsoft/react-native-test-app/releases/tag/0.11.0).",
"type": "object",
"properties": {
"debug": {
"description": "Use this property for the debug signing config for the app. The value `storeFile` is required. Android defaults will be provided for other properties.",
"allOf": [
{
"$ref": "#/$defs/signingConfig"
}
],
"type": "object"
},
"release": {
"description": "Use this property for the release signing config for the app. The value `storeFile` is required. Android defaults will be provided for other properties.",
"allOf": [
{
"$ref": "#/$defs/signingConfig"
}
],
"type": "object"
}
}
}
}
},
"ios": {
"description": "iOS specific properties go here.",
"allOf": [
{
"$ref": "#/$defs/apple"
}
],
"type": "object",
"properties": {
"reactNativePath": {
"description": "Sets a custom path to React Native. Useful for when `require(\"react-native\")` does not return the desired path.",
"type": "string"
}
}
},
"macos": {
"description": "macOS specific properties go here.",
"allOf": [
{
"$ref": "#/$defs/apple"
}
],
"type": "object",
"properties": {
"reactNativePath": {
"description": "Sets a custom path to React Native for macOS. Useful for when `require(\"react-native-macos\")` does not return the desired path.",
"type": "string"
}
}
},
"windows": {
"description": "Windows specific properties go here.",
"type": "object",
"properties": {
"appxManifest": {
"description": "Sets the path to your\n<a href='https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/appx-package-manifest'>app\npackage manifest</a>. If none is set, a default manifest will be provided.\nChanges to this property will not be automatically be picked up; you need to\nre-run `npx install-windows-test-app` to update the solution.",
"markdownDescription": "Sets the path to your\n<a href='https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/appx-package-manifest'>app\npackage manifest</a>. If none is set, a default manifest will be provided.\nChanges to this property will not be automatically be picked up; you need to\nre-run `npx install-windows-test-app` to update the solution.\n\nIntroduced in\n[0.5.5](https://github.com/microsoft/react-native-test-app/releases/tag/0.5.5).",
"type": "string"
},
"certificateKeyFile": {
"description": "The path to the certificate to use. If specified, it will also enable package\nsigning. Changes to this property will not be automatically be picked up; you\nneed to re-run `npx install-windows-test-app` to update the solution.",
"markdownDescription": "The path to the certificate to use. If specified, it will also enable package\nsigning. Changes to this property will not be automatically be picked up; you\nneed to re-run `npx install-windows-test-app` to update the solution.\n\nIntroduced in\n[1.1.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.1.0).",
"type": "string"
},
"certificatePassword": {
"description": "The password for the private key in the certificate. Leave unset if no password.\nChanges to this property will not be automatically be picked up; you need to\nre-run `npx install-windows-test-app` to update the solution.",
"markdownDescription": "The password for the private key in the certificate. Leave unset if no password.\nChanges to this property will not be automatically be picked up; you need to\nre-run `npx install-windows-test-app` to update the solution.\n\nIntroduced in\n[1.1.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.1.0).",
"type": "string"
},
"certificateThumbprint": {
"description": "This value must match the thumbprint in the signing certificate, or be unset.\nChanges to this property will not be automatically be picked up; you need to\nre-run `npx install-windows-test-app` to update the solution.",
"markdownDescription": "This value must match the thumbprint in the signing certificate, or be unset.\nChanges to this property will not be automatically be picked up; you need to\nre-run `npx install-windows-test-app` to update the solution.\n\nIntroduced in\n[1.1.0](https://github.com/microsoft/react-native-test-app/releases/tag/1.1.0).",
"type": "string"
}
}
}
}
}