diff --git a/packages/platform-ios/src/commands/runIOS/index.js b/packages/platform-ios/src/commands/runIOS/index.js index 3d3b395bf..239334d07 100644 --- a/packages/platform-ios/src/commands/runIOS/index.js +++ b/packages/platform-ios/src/commands/runIOS/index.js @@ -329,7 +329,13 @@ function getBuildPath(configuration, appName, isDevice, scheme) { device = 'iphonesimulator'; } - return `build/${scheme}/Build/Products/${configuration}-${device}/${appName}.app`; + let buildPath = `build/${scheme}/Build/Products/${configuration}-${device}/${appName}.app`; + // Check wether app file exist, sometimes `-derivedDataPath` option of `xcodebuild` not works as expected. + if (!fs.existsSync(path.join(buildPath))) { + return `DerivedData/Build/Products/${configuration}-${device}/${appName}.app`; + } + + return buildPath; } function getProductName(buildOutput) {