From 3242840d191d0258cff227d855f44a98559d2f2e Mon Sep 17 00:00:00 2001 From: Vijay Vikram Singh Date: Tue, 2 Feb 2021 06:46:40 -0800 Subject: [PATCH] fix(ios): swift enabling in Objc module should build (#12372) Fixes TIMOB-28304 --- iphone/cli/commands/_buildModule.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iphone/cli/commands/_buildModule.js b/iphone/cli/commands/_buildModule.js index a71993f2c18..0c832085067 100644 --- a/iphone/cli/commands/_buildModule.js +++ b/iphone/cli/commands/_buildModule.js @@ -572,9 +572,13 @@ iOSModuleBuilder.prototype.buildModule = function buildModule(next) { '-archivePath', path.join(this.projectDir, 'build', target + '.xcarchive'), '-UseNewBuildSystem=YES', 'ONLY_ACTIVE_ARCH=NO', - 'BUILD_LIBRARY_FOR_DISTRIBUTION=YES', 'SKIP_INSTALL=NO', ]; + + if (this.isFramework) { + args.push('BUILD_LIBRARY_FOR_DISTRIBUTION=YES'); + } + const scheme = this.isFramework ? this.moduleIdAsIdentifier : this.moduleName; args.push('-scheme'); args.push(scheme);