|
1 | 1 | const { |
2 | | - buildOptions, |
3 | 2 | createBuild, |
4 | 3 | createLog, |
5 | 4 | createRun, |
6 | | - logOptions, |
7 | | - runOptions, |
| 5 | + getRunOptions, |
| 6 | + getLogOptions, |
| 7 | + getBuildOptions, |
8 | 8 | } = require('@react-native-community/cli-platform-apple'); |
9 | 9 |
|
| 10 | +const platformName = 'visionos'; |
| 11 | + |
10 | 12 | const run = { |
11 | 13 | name: 'run-visionos', |
12 | 14 | description: 'builds your app and starts it on visionOS simulator', |
13 | | - func: createRun({platformName: 'visionos'}), |
| 15 | + func: createRun({platformName}), |
14 | 16 | examples: [ |
15 | 17 | { |
16 | 18 | desc: 'Run on a specific simulator', |
17 | 19 | cmd: 'npx @callstack/react-native-visionos run-visionos --simulator "Apple Vision Pro"', |
18 | 20 | }, |
19 | 21 | ], |
20 | | - options: runOptions, |
| 22 | + options: getRunOptions({platformName}), |
21 | 23 | }; |
22 | 24 |
|
23 | 25 | const log = { |
24 | 26 | name: 'log-visionos', |
25 | 27 | description: 'starts visionOS device syslog tail', |
26 | 28 | func: createLog({platformName: 'visionos'}), |
27 | | - options: logOptions, |
| 29 | + options: getLogOptions({platformName}), |
28 | 30 | }; |
29 | 31 |
|
30 | 32 | const build = { |
31 | 33 | name: 'build-visionos', |
32 | 34 | description: 'builds your app for visionOS platform', |
33 | | - func: createBuild({platformName: 'visionos'}), |
| 35 | + func: createBuild({platformName}), |
34 | 36 | examples: [ |
35 | 37 | { |
36 | 38 | desc: 'Build the app for all visionOS devices in Release mode', |
37 | 39 | cmd: 'npx @callstack/react-native-visionos build-visionos --mode "Release"', |
38 | 40 | }, |
39 | 41 | ], |
40 | | - options: buildOptions, |
| 42 | + options: getBuildOptions({platformName}), |
41 | 43 | }; |
42 | 44 |
|
43 | 45 | module.exports = [run, log, build]; |
0 commit comments