forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a916898
commit f27e9a7
Showing
17 changed files
with
344 additions
and
573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
const { | ||
createBuild, | ||
createLog, | ||
createRun, | ||
getRunOptions, | ||
getLogOptions, | ||
getBuildOptions, | ||
} = require('@react-native-community/cli-platform-apple'); | ||
let apple; | ||
try { | ||
apple = require('@react-native-community/cli-platform-apple'); | ||
} catch { | ||
if (verbose) { | ||
console.warn( | ||
'@react-native-community/cli-platform-apple not found, the react-native.config.js may be unusable.', | ||
); | ||
} | ||
} | ||
|
||
const platformName = 'visionos'; | ||
|
||
const run = { | ||
name: 'run-visionos', | ||
description: 'builds your app and starts it on visionOS simulator', | ||
func: createRun({platformName}), | ||
func: apple.createRun({platformName}), | ||
examples: [ | ||
{ | ||
desc: 'Run on a specific simulator', | ||
cmd: 'npx @callstack/react-native-visionos run-visionos --simulator "Apple Vision Pro"', | ||
}, | ||
], | ||
options: getRunOptions({platformName}), | ||
options: apple.getRunOptions({platformName}), | ||
}; | ||
|
||
const log = { | ||
name: 'log-visionos', | ||
description: 'starts visionOS device syslog tail', | ||
func: createLog({platformName: 'visionos'}), | ||
options: getLogOptions({platformName}), | ||
func: apple.createLog({platformName: 'visionos'}), | ||
options: apple.getLogOptions({platformName}), | ||
}; | ||
|
||
const build = { | ||
name: 'build-visionos', | ||
description: 'builds your app for visionOS platform', | ||
func: createBuild({platformName}), | ||
func: apple.createBuild({platformName}), | ||
examples: [ | ||
{ | ||
desc: 'Build the app for all visionOS devices in Release mode', | ||
cmd: 'npx @callstack/react-native-visionos build-visionos --mode "Release"', | ||
}, | ||
], | ||
options: getBuildOptions({platformName}), | ||
options: apple.getBuildOptions({platformName}), | ||
}; | ||
|
||
module.exports = [run, log, build]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.