@react-native-community/cli-platform-apple
Advanced tools
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"createRun.d.ts","sourceRoot":"","sources":["../../../src/commands/runCommand/createRun.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAC,MAAM,EAAmB,MAAM,mCAAmC,CAAC;AAY3E,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AASxD,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAO3C,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAYD,QAAA,MAAM,SAAS,qBACI,cAAc,SACrB,MAAM,MAAM,CAAC,OAAO,MAAM,QAAQ,MAAM,kBAuUjD,CAAC;AAEJ,eAAe,SAAS,CAAC"} | ||
| {"version":3,"file":"createRun.d.ts","sourceRoot":"","sources":["../../../src/commands/runCommand/createRun.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAC,MAAM,EAAmB,MAAM,mCAAmC,CAAC;AAY3E,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AASxD,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAO3C,MAAM,WAAW,MAAO,SAAQ,UAAU;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAYD,QAAA,MAAM,SAAS,qBACI,cAAc,SACrB,MAAM,MAAM,CAAC,OAAO,MAAM,QAAQ,MAAM,kBAuVjD,CAAC;AAEJ,eAAe,SAAS,CAAC"} |
@@ -201,9 +201,28 @@ "use strict"; | ||
| if (args.udid) { | ||
| const device = devices.find(d => d.udid === args.udid); | ||
| var _device; | ||
| let device = devices.find(d => d.udid === args.udid); | ||
| if (!device) { | ||
| return _cliTools().logger.error(`Could not find a device with udid: "${_chalk().default.bold(args.udid)}". ${(0, _matchingDevice.printFoundDevices)(devices)}`); | ||
| // We may be able to recover from this for macCatalyst app starts, | ||
| // but the general case is this is a problem and device list will help | ||
| _cliTools().logger.warn(`Could not find a device with udid: "${_chalk().default.bold(args.udid)}". ${(0, _matchingDevice.printFoundDevices)(devices)}`); | ||
| } | ||
| if (device.type === 'simulator') { | ||
| if (((_device = device) === null || _device === void 0 ? void 0 : _device.type) === 'simulator') { | ||
| return (0, _runOnSimulator.runOnSimulator)(xcodeProject, platformName, mode, scheme, args, fallbackSimulator); | ||
| } else { | ||
| if (!device) { | ||
| // On arm64 machines, the catalyst UDID returned by 'xcrun xctrace list devices' is not correct | ||
| // xcodebuild will return an error indicating the UDID is unknown and offering a different one | ||
| // you may obtain it by running xcodebuild with the UDID you think works then parse out the other one from the returned error: | ||
| // CATALYST_DESTINATION=$(xcodebuild -workspace ios/rnfbdemo.xcworkspace -configuration Debug -scheme rnfbdemo -destination id=7153382A-C92B-5798-BEA3-D82D195F25F8 2>&1|grep macOS|grep Catalyst|head -1 |cut -d':' -f5 |cut -d' ' -f1) | ||
| // | ||
| // How to handle the incorrect catalyst UDID? | ||
| // Assume if a UDID is specified, the user knows what they are doing. | ||
| // Use the given UDID and force the type, so "catalyst" will launch the app correctly | ||
| device = { | ||
| name: 'unknown', | ||
| udid: args.udid, | ||
| type: 'catalyst' | ||
| }; | ||
| _cliTools().logger.warn('Running with provided udid anyway, and type "catalyst". \'xcodebuild\' command may return error.'); | ||
| } | ||
| return (0, _runOnDevice.runOnDevice)(device, platformName, mode, scheme, xcodeProject, args); | ||
@@ -210,0 +229,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"names":["getPackageJson","root","require","path","join","CLIError","createRun","platformName","_","ctx","args","link","setPlatform","platformConfig","project","sdkNames","readableName","platformReadableName","getPlatformInfo","undefined","supportedPlatforms","packager","port","installedPods","automaticPodsInstallation","forcePods","onlyPods","isAppRunningNewArchitecture","sourceDir","getArchitecture","resolvePods","dependencies","reactNativePath","forceInstall","newArchEnabled","newPort","startPackager","findDevServerPort","startServerInNewWindow","terminal","reactNativeVersion","setVersion","xcodeProject","getXcodeProjectAndDir","process","chdir","binaryPath","isAbsolute","fs","existsSync","mode","scheme","getConfiguration","buildOutput","buildProject","openApp","target","devices","listDevices","length","logger","error","packageJson","preferredDevice","cacheManager","get","name","preferredDeviceIndex","findIndex","udid","device","splice","unshift","fallbackSimulator","getFallbackSimulator","interactive","warn","selectedDevice","promptForDeviceSelection","set","type","runOnSimulator","runOnDevice","simulator","bootedSimulators","filter","state","bootedDevices","booted","info","map","find","d","chalk","bold","printFoundDevices","matchingDevice","deviceByUdid"],"sources":["../../../src/commands/runCommand/createRun.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport path from 'path';\nimport fs from 'fs';\nimport chalk from 'chalk';\nimport {Config, IOSProjectConfig} from '@react-native-community/cli-types';\nimport {\n logger,\n CLIError,\n link,\n startServerInNewWindow,\n findDevServerPort,\n cacheManager,\n} from '@react-native-community/cli-tools';\nimport getArchitecture from '../../tools/getArchitecture';\nimport listDevices from '../../tools/listDevices';\nimport {promptForDeviceSelection} from '../../tools/prompts';\nimport {BuildFlags} from '../buildCommand/buildOptions';\nimport {buildProject} from '../buildCommand/buildProject';\nimport {getConfiguration} from '../buildCommand/getConfiguration';\nimport {getXcodeProjectAndDir} from '../buildCommand/getXcodeProjectAndDir';\nimport {getFallbackSimulator} from './getFallbackSimulator';\nimport {getPlatformInfo} from './getPlatformInfo';\nimport {printFoundDevices, matchingDevice} from './matchingDevice';\nimport {runOnDevice} from './runOnDevice';\nimport {runOnSimulator} from './runOnSimulator';\nimport {BuilderCommand} from '../../types';\nimport {\n supportedPlatforms,\n resolvePods,\n} from '@react-native-community/cli-config-apple';\nimport openApp from './openApp';\n\nexport interface FlagsT extends BuildFlags {\n simulator?: string;\n device?: string | true;\n udid?: string;\n binaryPath?: string;\n listDevices?: boolean;\n packager?: boolean;\n port: number;\n terminal?: string;\n}\n\nfunction getPackageJson(root: string) {\n try {\n return require(path.join(root, 'package.json'));\n } catch {\n throw new CLIError(\n 'No package.json found. Please make sure the file exists in the current folder.',\n );\n }\n}\n\nconst createRun =\n ({platformName}: BuilderCommand) =>\n async (_: Array<string>, ctx: Config, args: FlagsT) => {\n // React Native docs assume platform is always ios/android\n link.setPlatform('ios');\n const platformConfig = ctx.project[platformName] as IOSProjectConfig;\n const {sdkNames, readableName: platformReadableName} =\n getPlatformInfo(platformName);\n\n if (\n platformConfig === undefined ||\n supportedPlatforms[platformName] === undefined\n ) {\n throw new CLIError(\n `Unable to find ${platformReadableName} platform config`,\n );\n }\n\n let {packager, port} = args;\n let installedPods = false;\n // check if pods need to be installed\n if (\n platformConfig.automaticPodsInstallation ||\n args.forcePods ||\n args.onlyPods\n ) {\n const isAppRunningNewArchitecture = platformConfig.sourceDir\n ? await getArchitecture(platformConfig.sourceDir)\n : undefined;\n\n await resolvePods(\n ctx.root,\n platformConfig.sourceDir,\n ctx.dependencies,\n platformName,\n ctx.reactNativePath,\n {\n forceInstall: args.forcePods || args.onlyPods,\n newArchEnabled: isAppRunningNewArchitecture,\n },\n );\n\n installedPods = true;\n }\n\n if (args.onlyPods) {\n return;\n }\n\n if (packager) {\n const {port: newPort, startPackager} = await findDevServerPort(\n port,\n ctx.root,\n );\n\n if (startPackager) {\n await startServerInNewWindow(\n newPort,\n ctx.root,\n ctx.reactNativePath,\n args.terminal,\n );\n }\n }\n\n if (ctx.reactNativeVersion !== 'unknown') {\n link.setVersion(ctx.reactNativeVersion);\n }\n\n let {xcodeProject, sourceDir} = getXcodeProjectAndDir(\n platformConfig,\n platformName,\n installedPods,\n );\n\n process.chdir(sourceDir);\n\n if (args.binaryPath) {\n args.binaryPath = path.isAbsolute(args.binaryPath)\n ? args.binaryPath\n : path.join(ctx.root, args.binaryPath);\n\n if (!fs.existsSync(args.binaryPath)) {\n throw new CLIError(\n 'binary-path was specified, but the file was not found.',\n );\n }\n }\n\n const {mode, scheme} = await getConfiguration(\n xcodeProject,\n sourceDir,\n args,\n platformName,\n );\n\n if (platformName === 'macos') {\n const buildOutput = await buildProject(\n xcodeProject,\n platformName,\n undefined,\n mode,\n scheme,\n args,\n );\n\n openApp({\n buildOutput,\n xcodeProject,\n mode,\n scheme,\n target: args.target,\n binaryPath: args.binaryPath,\n });\n\n return;\n }\n\n let devices = await listDevices(sdkNames);\n\n if (devices.length === 0) {\n return logger.error(\n `${platformReadableName} devices or simulators not detected. Install simulators via Xcode or connect a physical ${platformReadableName} device`,\n );\n }\n\n const packageJson = getPackageJson(ctx.root);\n\n const preferredDevice = cacheManager.get(\n packageJson.name,\n 'lastUsedIOSDeviceId',\n );\n\n if (preferredDevice) {\n const preferredDeviceIndex = devices.findIndex(\n ({udid}) => udid === preferredDevice,\n );\n\n if (preferredDeviceIndex > -1) {\n const [device] = devices.splice(preferredDeviceIndex, 1);\n devices.unshift(device);\n }\n }\n\n const fallbackSimulator =\n platformName === 'ios' || platformName === 'tvos'\n ? getFallbackSimulator(args)\n : devices[0];\n\n if (args.listDevices || args.interactive) {\n if (args.device || args.udid) {\n logger.warn(\n `Both ${\n args.device ? 'device' : 'udid'\n } and \"list-devices\" parameters were passed to \"run\" command. We will list available devices and let you choose from one.`,\n );\n }\n\n const selectedDevice = await promptForDeviceSelection(devices);\n\n if (!selectedDevice) {\n throw new CLIError(\n `Failed to select device, please try to run app without ${\n args.listDevices ? 'list-devices' : 'interactive'\n } command.`,\n );\n } else {\n if (selectedDevice.udid !== preferredDevice) {\n cacheManager.set(\n packageJson.name,\n 'lastUsedIOSDeviceId',\n selectedDevice.udid,\n );\n }\n }\n\n if (selectedDevice.type === 'simulator') {\n return runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n selectedDevice,\n );\n } else {\n return runOnDevice(\n selectedDevice,\n platformName,\n mode,\n scheme,\n xcodeProject,\n args,\n );\n }\n }\n\n if (!args.device && !args.udid && !args.simulator) {\n const bootedSimulators = devices.filter(\n ({state, type}) => state === 'Booted' && type === 'simulator',\n );\n const bootedDevices = devices.filter(({type}) => type === 'device'); // Physical devices here are always booted\n const booted = [...bootedSimulators, ...bootedDevices];\n\n if (booted.length === 0) {\n logger.info(\n 'No booted devices or simulators found. Launching first available simulator...',\n );\n return runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n fallbackSimulator,\n );\n }\n\n logger.info(`Found booted ${booted.map(({name}) => name).join(', ')}`);\n\n for (const simulator of bootedSimulators) {\n await runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n simulator || fallbackSimulator,\n );\n }\n\n for (const device of bootedDevices) {\n await runOnDevice(\n device,\n platformName,\n mode,\n scheme,\n xcodeProject,\n args,\n );\n }\n\n return;\n }\n\n if (args.device && args.udid) {\n return logger.error(\n 'The `device` and `udid` options are mutually exclusive.',\n );\n }\n\n if (args.udid) {\n const device = devices.find((d) => d.udid === args.udid);\n if (!device) {\n return logger.error(\n `Could not find a device with udid: \"${chalk.bold(\n args.udid,\n )}\". ${printFoundDevices(devices)}`,\n );\n }\n if (device.type === 'simulator') {\n return runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n fallbackSimulator,\n );\n } else {\n return runOnDevice(\n device,\n platformName,\n mode,\n scheme,\n xcodeProject,\n args,\n );\n }\n } else if (args.device) {\n let device = matchingDevice(devices, args.device);\n\n if (!device) {\n const deviceByUdid = devices.find((d) => d.udid === args.device);\n if (!deviceByUdid) {\n return logger.error(\n `Could not find a physical device with name or unique device identifier: \"${chalk.bold(\n args.device,\n )}\". ${printFoundDevices(devices, 'device')}`,\n );\n }\n\n device = deviceByUdid;\n\n if (deviceByUdid.type === 'simulator') {\n return logger.error(\n `The device with udid: \"${chalk.bold(\n args.device,\n )}\" is a simulator. If you want to run on a simulator, use the \"--simulator\" flag instead.`,\n );\n }\n }\n\n if (device && device.type === 'simulator') {\n return logger.error(\n \"`--device` flag is intended for physical devices. If you're trying to run on a simulator, use `--simulator` instead.\",\n );\n }\n\n if (device && device.type === 'device') {\n return runOnDevice(\n device,\n platformName,\n mode,\n scheme,\n xcodeProject,\n args,\n );\n }\n } else {\n runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n fallbackSimulator,\n );\n }\n };\n\nexport default createRun;\n"],"mappings":";;;;;;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;AAAgC;AArChC;AACA;AACA;AACA;AACA;AACA;AACA;;AA4CA,SAASA,cAAc,CAACC,IAAY,EAAE;EACpC,IAAI;IACF,OAAOC,OAAO,CAACC,eAAI,CAACC,IAAI,CAACH,IAAI,EAAE,cAAc,CAAC,CAAC;EACjD,CAAC,CAAC,MAAM;IACN,MAAM,KAAII,oBAAQ,EAChB,gFAAgF,CACjF;EACH;AACF;AAEA,MAAMC,SA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,iBAAiB,CAClB;EACH;AACF,CAAC;AAAC,eAEWnE,SAAS;AAAA"} | ||
| {"version":3,"names":["getPackageJson","root","require","path","join","CLIError","createRun","platformName","_","ctx","args","link","setPlatform","platformConfig","project","sdkNames","readableName","platformReadableName","getPlatformInfo","undefined","supportedPlatforms","packager","port","installedPods","automaticPodsInstallation","forcePods","onlyPods","isAppRunningNewArchitecture","sourceDir","getArchitecture","resolvePods","dependencies","reactNativePath","forceInstall","newArchEnabled","newPort","startPackager","findDevServerPort","startServerInNewWindow","terminal","reactNativeVersion","setVersion","xcodeProject","getXcodeProjectAndDir","process","chdir","binaryPath","isAbsolute","fs","existsSync","mode","scheme","getConfiguration","buildOutput","buildProject","openApp","target","devices","listDevices","length","logger","error","packageJson","preferredDevice","cacheManager","get","name","preferredDeviceIndex","findIndex","udid","device","splice","unshift","fallbackSimulator","getFallbackSimulator","interactive","warn","selectedDevice","promptForDeviceSelection","set","type","runOnSimulator","runOnDevice","simulator","bootedSimulators","filter","state","bootedDevices","booted","info","map","find","d","chalk","bold","printFoundDevices","matchingDevice","deviceByUdid"],"sources":["../../../src/commands/runCommand/createRun.ts"],"sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport path from 'path';\nimport fs from 'fs';\nimport chalk from 'chalk';\nimport {Config, IOSProjectConfig} from '@react-native-community/cli-types';\nimport {\n logger,\n CLIError,\n link,\n startServerInNewWindow,\n findDevServerPort,\n cacheManager,\n} from '@react-native-community/cli-tools';\nimport getArchitecture from '../../tools/getArchitecture';\nimport listDevices from '../../tools/listDevices';\nimport {promptForDeviceSelection} from '../../tools/prompts';\nimport {BuildFlags} from '../buildCommand/buildOptions';\nimport {buildProject} from '../buildCommand/buildProject';\nimport {getConfiguration} from '../buildCommand/getConfiguration';\nimport {getXcodeProjectAndDir} from '../buildCommand/getXcodeProjectAndDir';\nimport {getFallbackSimulator} from './getFallbackSimulator';\nimport {getPlatformInfo} from './getPlatformInfo';\nimport {printFoundDevices, matchingDevice} from './matchingDevice';\nimport {runOnDevice} from './runOnDevice';\nimport {runOnSimulator} from './runOnSimulator';\nimport {BuilderCommand} from '../../types';\nimport {\n supportedPlatforms,\n resolvePods,\n} from '@react-native-community/cli-config-apple';\nimport openApp from './openApp';\n\nexport interface FlagsT extends BuildFlags {\n simulator?: string;\n device?: string | true;\n udid?: string;\n binaryPath?: string;\n listDevices?: boolean;\n packager?: boolean;\n port: number;\n terminal?: string;\n}\n\nfunction getPackageJson(root: string) {\n try {\n return require(path.join(root, 'package.json'));\n } catch {\n throw new CLIError(\n 'No package.json found. Please make sure the file exists in the current folder.',\n );\n }\n}\n\nconst createRun =\n ({platformName}: BuilderCommand) =>\n async (_: Array<string>, ctx: Config, args: FlagsT) => {\n // React Native docs assume platform is always ios/android\n link.setPlatform('ios');\n const platformConfig = ctx.project[platformName] as IOSProjectConfig;\n const {sdkNames, readableName: platformReadableName} =\n getPlatformInfo(platformName);\n\n if (\n platformConfig === undefined ||\n supportedPlatforms[platformName] === undefined\n ) {\n throw new CLIError(\n `Unable to find ${platformReadableName} platform config`,\n );\n }\n\n let {packager, port} = args;\n let installedPods = false;\n // check if pods need to be installed\n if (\n platformConfig.automaticPodsInstallation ||\n args.forcePods ||\n args.onlyPods\n ) {\n const isAppRunningNewArchitecture = platformConfig.sourceDir\n ? await getArchitecture(platformConfig.sourceDir)\n : undefined;\n\n await resolvePods(\n ctx.root,\n platformConfig.sourceDir,\n ctx.dependencies,\n platformName,\n ctx.reactNativePath,\n {\n forceInstall: args.forcePods || args.onlyPods,\n newArchEnabled: isAppRunningNewArchitecture,\n },\n );\n\n installedPods = true;\n }\n\n if (args.onlyPods) {\n return;\n }\n\n if (packager) {\n const {port: newPort, startPackager} = await findDevServerPort(\n port,\n ctx.root,\n );\n\n if (startPackager) {\n await startServerInNewWindow(\n newPort,\n ctx.root,\n ctx.reactNativePath,\n args.terminal,\n );\n }\n }\n\n if (ctx.reactNativeVersion !== 'unknown') {\n link.setVersion(ctx.reactNativeVersion);\n }\n\n let {xcodeProject, sourceDir} = getXcodeProjectAndDir(\n platformConfig,\n platformName,\n installedPods,\n );\n\n process.chdir(sourceDir);\n\n if (args.binaryPath) {\n args.binaryPath = path.isAbsolute(args.binaryPath)\n ? args.binaryPath\n : path.join(ctx.root, args.binaryPath);\n\n if (!fs.existsSync(args.binaryPath)) {\n throw new CLIError(\n 'binary-path was specified, but the file was not found.',\n );\n }\n }\n\n const {mode, scheme} = await getConfiguration(\n xcodeProject,\n sourceDir,\n args,\n platformName,\n );\n\n if (platformName === 'macos') {\n const buildOutput = await buildProject(\n xcodeProject,\n platformName,\n undefined,\n mode,\n scheme,\n args,\n );\n\n openApp({\n buildOutput,\n xcodeProject,\n mode,\n scheme,\n target: args.target,\n binaryPath: args.binaryPath,\n });\n\n return;\n }\n\n let devices = await listDevices(sdkNames);\n\n if (devices.length === 0) {\n return logger.error(\n `${platformReadableName} devices or simulators not detected. Install simulators via Xcode or connect a physical ${platformReadableName} device`,\n );\n }\n\n const packageJson = getPackageJson(ctx.root);\n\n const preferredDevice = cacheManager.get(\n packageJson.name,\n 'lastUsedIOSDeviceId',\n );\n\n if (preferredDevice) {\n const preferredDeviceIndex = devices.findIndex(\n ({udid}) => udid === preferredDevice,\n );\n\n if (preferredDeviceIndex > -1) {\n const [device] = devices.splice(preferredDeviceIndex, 1);\n devices.unshift(device);\n }\n }\n\n const fallbackSimulator =\n platformName === 'ios' || platformName === 'tvos'\n ? getFallbackSimulator(args)\n : devices[0];\n\n if (args.listDevices || args.interactive) {\n if (args.device || args.udid) {\n logger.warn(\n `Both ${\n args.device ? 'device' : 'udid'\n } and \"list-devices\" parameters were passed to \"run\" command. We will list available devices and let you choose from one.`,\n );\n }\n\n const selectedDevice = await promptForDeviceSelection(devices);\n\n if (!selectedDevice) {\n throw new CLIError(\n `Failed to select device, please try to run app without ${\n args.listDevices ? 'list-devices' : 'interactive'\n } command.`,\n );\n } else {\n if (selectedDevice.udid !== preferredDevice) {\n cacheManager.set(\n packageJson.name,\n 'lastUsedIOSDeviceId',\n selectedDevice.udid,\n );\n }\n }\n\n if (selectedDevice.type === 'simulator') {\n return runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n selectedDevice,\n );\n } else {\n return runOnDevice(\n selectedDevice,\n platformName,\n mode,\n scheme,\n xcodeProject,\n args,\n );\n }\n }\n\n if (!args.device && !args.udid && !args.simulator) {\n const bootedSimulators = devices.filter(\n ({state, type}) => state === 'Booted' && type === 'simulator',\n );\n const bootedDevices = devices.filter(({type}) => type === 'device'); // Physical devices here are always booted\n const booted = [...bootedSimulators, ...bootedDevices];\n\n if (booted.length === 0) {\n logger.info(\n 'No booted devices or simulators found. Launching first available simulator...',\n );\n return runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n fallbackSimulator,\n );\n }\n\n logger.info(`Found booted ${booted.map(({name}) => name).join(', ')}`);\n\n for (const simulator of bootedSimulators) {\n await runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n simulator || fallbackSimulator,\n );\n }\n\n for (const device of bootedDevices) {\n await runOnDevice(\n device,\n platformName,\n mode,\n scheme,\n xcodeProject,\n args,\n );\n }\n\n return;\n }\n\n if (args.device && args.udid) {\n return logger.error(\n 'The `device` and `udid` options are mutually exclusive.',\n );\n }\n\n if (args.udid) {\n let device = devices.find((d) => d.udid === args.udid);\n if (!device) {\n // We may be able to recover from this for macCatalyst app starts,\n // but the general case is this is a problem and device list will help\n logger.warn(\n `Could not find a device with udid: \"${chalk.bold(\n args.udid,\n )}\". ${printFoundDevices(devices)}`,\n );\n }\n if (device?.type === 'simulator') {\n return runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n fallbackSimulator,\n );\n } else {\n if (!device) {\n // On arm64 machines, the catalyst UDID returned by 'xcrun xctrace list devices' is not correct\n // xcodebuild will return an error indicating the UDID is unknown and offering a different one\n // you may obtain it by running xcodebuild with the UDID you think works then parse out the other one from the returned error:\n // CATALYST_DESTINATION=$(xcodebuild -workspace ios/rnfbdemo.xcworkspace -configuration Debug -scheme rnfbdemo -destination id=7153382A-C92B-5798-BEA3-D82D195F25F8 2>&1|grep macOS|grep Catalyst|head -1 |cut -d':' -f5 |cut -d' ' -f1)\n //\n // How to handle the incorrect catalyst UDID?\n // Assume if a UDID is specified, the user knows what they are doing.\n // Use the given UDID and force the type, so \"catalyst\" will launch the app correctly\n device = {name: 'unknown', udid: args.udid, type: 'catalyst'};\n logger.warn(\n 'Running with provided udid anyway, and type \"catalyst\". \\'xcodebuild\\' command may return error.',\n );\n }\n return runOnDevice(\n device,\n platformName,\n mode,\n scheme,\n xcodeProject,\n args,\n );\n }\n } else if (args.device) {\n let device = matchingDevice(devices, args.device);\n\n if (!device) {\n const deviceByUdid = devices.find((d) => d.udid === args.device);\n if (!deviceByUdid) {\n return logger.error(\n `Could not find a physical device with name or unique device identifier: \"${chalk.bold(\n args.device,\n )}\". ${printFoundDevices(devices, 'device')}`,\n );\n }\n\n device = deviceByUdid;\n\n if (deviceByUdid.type === 'simulator') {\n return logger.error(\n `The device with udid: \"${chalk.bold(\n args.device,\n )}\" is a simulator. If you want to run on a simulator, use the \"--simulator\" flag instead.`,\n );\n }\n }\n\n if (device && device.type === 'simulator') {\n return logger.error(\n \"`--device` flag is intended for physical devices. If you're trying to run on a simulator, use `--simulator` instead.\",\n );\n }\n\n if (device && device.type === 'device') {\n return runOnDevice(\n device,\n platformName,\n mode,\n scheme,\n xcodeProject,\n args,\n );\n }\n } else {\n runOnSimulator(\n xcodeProject,\n platformName,\n mode,\n scheme,\n args,\n fallbackSimulator,\n );\n }\n };\n\nexport default createRun;\n"],"mappings":";;;;;;AAQA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;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AAO,EAAE,QAAQ,CAAE,EAAC,CAC9C;MACH;MAEAa,MAAM,GAAG2B,YAAY;MAErB,IAAIA,YAAY,CAACjB,IAAI,KAAK,WAAW,EAAE;QACrC,OAAOpB,kBAAM,CAACC,KAAK,CAChB,0BAAyBgC,gBAAK,CAACC,IAAI,CAClCpF,IAAI,CAAC4D,MAAM,CACX,0FAAyF,CAC5F;MACH;IACF;IAEA,IAAIA,MAAM,IAAIA,MAAM,CAACU,IAAI,KAAK,WAAW,EAAE;MACzC,OAAOpB,kBAAM,CAACC,KAAK,CACjB,sHAAsH,CACvH;IACH;IAEA,IAAIS,MAAM,IAAIA,MAAM,CAACU,IAAI,KAAK,QAAQ,EAAE;MACtC,OAAO,IAAAE,wBAAW,EAChBZ,MAAM,EACN/D,YAAY,EACZ2C,IAAI,EACJC,MAAM,EACNT,YAAY,EACZhC,IAAI,CACL;IACH;EACF,CAAC,MAAM;IACL,IAAAuE,8BAAc,EACZvC,YAAY,EACZnC,YAAY,EACZ2C,IAAI,EACJC,MAAM,EACNzC,IAAI,EACJ+D,iBAAiB,CAClB;EACH;AACF,CAAC;AAAC,eAEWnE,SAAS;AAAA"} |
+5
-5
| { | ||
| "name": "@react-native-community/cli-platform-apple", | ||
| "version": "20.0.1", | ||
| "version": "20.0.2", | ||
| "license": "MIT", | ||
@@ -10,4 +10,4 @@ "main": "build/index.js", | ||
| "dependencies": { | ||
| "@react-native-community/cli-config-apple": "20.0.1", | ||
| "@react-native-community/cli-tools": "20.0.1", | ||
| "@react-native-community/cli-config-apple": "20.0.2", | ||
| "@react-native-community/cli-tools": "20.0.2", | ||
| "chalk": "^4.1.2", | ||
@@ -18,3 +18,3 @@ "execa": "^5.0.0", | ||
| "devDependencies": { | ||
| "@react-native-community/cli-types": "20.0.1" | ||
| "@react-native-community/cli-types": "20.0.2" | ||
| }, | ||
@@ -32,3 +32,3 @@ "files": [ | ||
| }, | ||
| "gitHead": "d9ee06a0838be084548228ad6eed23c98a76b3af" | ||
| "gitHead": "7c8951c9cd536d9688fd14fe39a977cbe3ec91c5" | ||
| } |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
222613
1.28%2262
0.85%+ Added
+ Added
- Removed
- Removed