Skip to content

Commit

Permalink
fix: Add fallback path check when not found app file for iOS (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw authored and thymikee committed Jun 14, 2019
1 parent 56cae62 commit 0839527
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/cli/src/commands/runIOS/runIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,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) {
Expand Down

0 comments on commit 0839527

Please sign in to comment.