From c4d90fe0e1cc65f7481c5e715182f0f73f28048f Mon Sep 17 00:00:00 2001 From: Appcelerator Build Date: Thu, 1 Oct 2020 11:52:00 -0400 Subject: [PATCH] fix(ios): check for thirdparty framework path (#12148) Fixes TIMOB-28156 --- iphone/cli/commands/_buildModule.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/iphone/cli/commands/_buildModule.js b/iphone/cli/commands/_buildModule.js index e601b51999d..1902d21aa32 100644 --- a/iphone/cli/commands/_buildModule.js +++ b/iphone/cli/commands/_buildModule.js @@ -518,11 +518,13 @@ iOSModuleBuilder.prototype.buildModule = function buildModule(next) { const frameworksPath = path.join(this.projectDir, 'platform'); const legacyFrameworks = new Set(); - fs.readdirSync(frameworksPath).forEach(filename => { - if (filename.endsWith('.framework')) { - legacyFrameworks.add(filename); - } - }); + if (fs.existsSync(frameworksPath)) { + fs.readdirSync(frameworksPath).forEach(filename => { + if (filename.endsWith('.framework')) { + legacyFrameworks.add(filename); + } + }); + } if (legacyFrameworks.size > 0) { const pbxFilePath = path.join(this.projectDir, `${this.moduleName}.xcodeproj`, 'project.pbxproj'); const proj = xcode.project(pbxFilePath).parseSync();