Nicholas Cunningham f9d461e663
feat(react-native): update executor and schema files for expo and react-native to be continuous (#30985)
WIP

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2025-05-01 18:47:35 -04:00

98 lines
5.1 KiB
JSON

{
"name": "run-ios",
"implementation": "/packages/react-native/src/executors/run-ios/run-ios.impl.ts",
"schema": {
"version": 2,
"continuous": true,
"outputCapture": "direct-nodejs",
"cli": "nx",
"$id": "NxReactNativeRunIos",
"$schema": "https://json-schema.org/schema",
"title": "Run iOS application",
"description": "Run iOS target options.",
"type": "object",
"presets": [
{ "name": "Run iOS on a simulator", "keys": ["simulator"] },
{ "name": "Run iOS on a device", "keys": ["device"] },
{ "name": "Run iOS on a device with udid", "keys": ["udid"] }
],
"properties": {
"simulator": {
"type": "string",
"description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: \"iPhone 6 (10.0)\"",
"examples": [
"iPhone 14",
"iPhone 13",
"iPhone 12",
"iPhone 11",
"iPhone X"
],
"x-priority": "important"
},
"mode": {
"type": "string",
"description": "Explicitly set the scheme configuration to use",
"default": "Debug",
"examples": ["Debug", "Release"],
"x-priority": "important"
},
"scheme": {
"type": "string",
"description": "Explicitly set Xcode scheme to use"
},
"device": {
"type": "string",
"description": "Explicitly set device to use by name. The value is not required if you have a single device connected."
},
"udid": {
"type": "string",
"description": "Explicitly set device to use by udid"
},
"verbose": {
"type": "boolean",
"description": "Do not use xcbeautify or xcpretty even if installed"
},
"port": {
"type": "number",
"description": "The port where the packager server is listening on.",
"default": 8081
},
"xcconfig": {
"type": "string",
"description": "Explicitly set xcconfig to use"
},
"buildFolder": {
"type": "string",
"description": "Location for iOS build artifacts. Corresponds to Xcode's \"-derivedDataPath\". Relative to ios directory.",
"buildFolder": "./build"
},
"interactive": {
"type": "boolean",
"description": "Explicitly select which scheme and configuration to use before running a build"
},
"extraParams": {
"oneOf": [
{ "type": "array", "items": { "type": "string" } },
{ "type": "string" }
],
"description": "Custom params that will be passed to xcodebuild command."
},
"resetCache": {
"type": "boolean",
"description": "Resets metro cache.",
"default": false
},
"binaryPath": {
"type": "string",
"description": "Path relative to project root where pre-built .app binary lives."
}
},
"examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"run-ios\": {\n \"executor\": \"@nx/react-native:run-ios\",\n \"options\": {}\n }\n }\n}\n```\n\n```bash\nnx run mobile:run-ios\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Build the Debug/Release app\" %}\nThe `mode` option allows to specify the xcode configuartion schema, such as `Debug` or `Release`.\n\n```json\n \"run-ios\": {\n \"executor\": \"@nx/react-native:run-ios\",\n \"options\": {\n \"mode\": \"Release\"\n }\n }\n```\n\n```bash\nnx run-ios <app-name> --mode=Debug\n```\n\n{% /tab %}\n{% tab label=\"Run on a simulator\" %}\nThe `simulator` option allows you to launch your iOS app in a specific simulator.\n\nTo see all the available simulators, run command:\n\n```bash\nxcrun simctl list devices available\n```\n\n```json\n \"run-ios\": {\n \"executor\": \"@nx/react-native:run-ios\",\n \"options\": {\n \"simulator\": \"iPhone 14 Pro (16.2)\"\n }\n }\n```\n\n```bash\nnx run-ios <app-name> --simulator=\"iPhone 14 Pro (16.2)\"\n```\n\n{% /tab %}\n{% tab label=\"Run on a device\" %}\nThe `device` option allows you to launch your iOS app in a specific device.\n\nTo see all the available devices, run command:\n\n```bash\nxcrun simctl list devices available\n```\n\n```json\n \"run-ios\": {\n \"executor\": \"@nx/react-native:run-ios\",\n \"options\": {\n \"device\": \"deviceName\"\n }\n }\n```\n\n```bash\nnx run-ios <app-name> --device=\"deviceName\"\n```\n\n{% /tab %}\n{% tab label=\"Set Device by udid\" %}\nThe `udid` option allows you to explicitly set device to use by udid.\n\nTo see all the available simulators and devices with udid, run command:\n\n```bash\nxcrun simctl list devices available\n```\n\n```json\n \"run-ios\": {\n \"executor\": \"@nx/react-native:run-ios\",\n \"options\": {\n \"udid\": \"device udid\"\n }\n }\n```\n\n```bash\nnx run-ios <app-name> --udid=\"device udid\"\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n"
},
"description": "Runs iOS application.",
"aliases": [],
"hidden": false,
"path": "/packages/react-native/src/executors/run-ios/schema.json",
"type": "executor"
}