Skip to content

Commit

Permalink
fix(ios): unmark product directory to prevent removing required files
Browse files Browse the repository at this point in the history
It's probable that this might be too much

Fixes TIMOB-28130
  • Loading branch information
ewanharris authored and sgtcoolguy committed Sep 15, 2020
1 parent 44ebbaa commit 635d08c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -6687,15 +6687,21 @@ iOSBuilder.prototype.removeFiles = function removeFiles(next) {
this.unmarkBuildDirFiles(path.join(this.buildDir, 'export_options.plist'));
this.unmarkBuildDirFiles(path.join(this.buildDir, this.tiapp.name + '.xcarchive'));

const productsDir = path.join(this.buildDir, 'build', 'Products');
try {
const releaseDir = path.join(this.buildDir, 'build', 'Products', 'Release-iphoneos');
const releaseDir = path.join(productsDir, 'Release-iphoneos');
if (fs.lstatSync(path.join(releaseDir, this.tiapp.name + '.app')).isSymbolicLink()) {
this.unmarkBuildDirFiles(releaseDir);
}
} catch (e) {
// ignore
}

const product = `${this.xcodeTarget}-${this.xcodeTargetOS}`;
if (fs.existsSync(path.join(productsDir, product))) {
this.unmarkBuildDirFiles(path.join(productsDir, product));
}

this.logger.info(__('Removing files'));

const hook = this.cli.createHook('build.ios.removeFiles', this, function (done) {
Expand Down

0 comments on commit 635d08c

Please sign in to comment.