Socket
Socket
Sign inDemoInstall

@react-native-community/cli-platform-ios

Package Overview
Dependencies
Maintainers
34
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-community/cli-platform-ios - npm Package Compare versions

Comparing version 3.0.5-alpha.0 to 4.0.0

25

build/commands/runIOS/index.js

@@ -175,3 +175,3 @@ "use strict";

const appName = await buildProject(xcodeProject, selectedSimulator.udid, scheme, args);
const appPath = getBuildPath(args.configuration, appName, false, scheme);
const appPath = getBuildPath(xcodeProject, args.configuration, appName, false, scheme);

@@ -209,3 +209,3 @@ _cliTools().logger.info(`Installing "${_chalk().default.bold(appPath)}"`);

const appName = await buildProject(xcodeProject, selectedDevice.udid, scheme, args);
const iosDeployInstallArgs = ['--bundle', getBuildPath(args.configuration, appName, true, scheme), '--id', selectedDevice.udid, '--justlaunch'];
const iosDeployInstallArgs = ['--bundle', getBuildPath(xcodeProject, args.configuration, appName, true, scheme), '--id', selectedDevice.udid, '--justlaunch'];

@@ -227,3 +227,3 @@ _cliTools().logger.info(`Installing and launching your app on ${selectedDevice.name}`);

return new Promise((resolve, reject) => {
const xcodebuildArgs = [xcodeProject.isWorkspace ? '-workspace' : '-project', xcodeProject.name, '-configuration', args.configuration, '-scheme', scheme, '-destination', `id=${udid}`, '-derivedDataPath', `build/${scheme}`];
const xcodebuildArgs = [xcodeProject.isWorkspace ? '-workspace' : '-project', xcodeProject.name, '-configuration', args.configuration, '-scheme', scheme, '-destination', `id=${udid}`];

@@ -296,3 +296,8 @@ _cliTools().logger.info(`Building ${_chalk().default.dim(`(using "xcodebuild ${xcodebuildArgs.join(' ')}")`)}`);

function getBuildPath(configuration, appName, isDevice, scheme) {
function getTargetBuildDir(buildSettings) {
const targetBuildMatch = /TARGET_BUILD_DIR = (.+)$/m.exec(buildSettings);
return targetBuildMatch && targetBuildMatch[1] ? targetBuildMatch[1].trim() : null;
}
function getBuildPath(xcodeProject, configuration, appName, isDevice, scheme) {
let device;

@@ -308,9 +313,13 @@

let buildPath = `build/${scheme}/Build/Products/${configuration}-${device}/${appName}.app`; // Check wether app file exist, sometimes `-derivedDataPath` option of `xcodebuild` not works as expected.
const buildSettings = _child_process().default.execFileSync('xcodebuild', [xcodeProject.isWorkspace ? '-workspace' : '-project', xcodeProject.name, '-scheme', scheme, '-sdk', device, '-configuration', configuration, '-showBuildSettings'], {
encoding: 'utf8'
});
if (!_fs().default.existsSync(_path().default.join(buildPath))) {
return `DerivedData/Build/Products/${configuration}-${device}/${appName}.app`;
const targetBuildDir = getTargetBuildDir(buildSettings);
if (!targetBuildDir) {
throw new (_cliTools().CLIError)('Failed to get the target build directory.');
}
return buildPath;
return `${targetBuildDir}/${appName}.app`;
}

@@ -317,0 +326,0 @@

{
"name": "@react-native-community/cli-platform-ios",
"version": "3.0.5-alpha.0",
"version": "4.0.0",
"license": "MIT",

@@ -24,3 +24,3 @@ "main": "build/index.js",

],
"gitHead": "51757572c704279c2ae9774cdfb719662a500318"
"gitHead": "827374ff006f652d8a359f7b4eaee35446f0dd40"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc