From cb713046605fadfa6782ea23be21112b47374c15 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Wed, 8 Apr 2020 18:11:33 +0200 Subject: [PATCH 1/2] fix(cordova): Don't add as system library if it's a vendored library --- cli/src/ios/update.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cli/src/ios/update.ts b/cli/src/ios/update.ts index e8d0e773c..844793574 100644 --- a/cli/src/ios/update.ts +++ b/cli/src/ios/update.ts @@ -207,14 +207,15 @@ async function generateCordovaPodspec(cordovaPlugins: Plugin[], config: Config, } }); }); + const onlySystemLibraries = systemLibraries.filter(library => removeNoSystem(library, sourceFrameworks)); if (weakFrameworks.length > 0) { frameworkDeps.push(`s.weak_frameworks = '${weakFrameworks.join(`', '`)}'`); } if (linkedFrameworks.length > 0) { frameworkDeps.push(`s.frameworks = '${linkedFrameworks.join(`', '`)}'`); } - if (systemLibraries.length > 0) { - frameworkDeps.push(`s.libraries = '${systemLibraries.join(`', '`)}'`); + if (onlySystemLibraries.length > 0) { + frameworkDeps.push(`s.libraries = '${onlySystemLibraries.join(`', '`)}'`); } if (customFrameworks.length > 0) { frameworkDeps.push(`s.vendored_frameworks = '${customFrameworks.join(`', '`)}'`); @@ -340,6 +341,11 @@ function filterARCFiles(plugin: Plugin) { return sourcesARC.length > 0; } +function removeNoSystem(library: string, sourceFrameworks: Array) { + const libraries = sourceFrameworks.filter(framework => framework.includes(library)); + return libraries.length == 0; +} + async function getPluginsTask(config: Config) { return await runTask('Updating iOS plugins', async () => { const allPlugins = await getPlugins(config); From 3f6f03f60d57d7d8ded829b6b0a2b6de9ac4f008 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Wed, 8 Apr 2020 18:21:42 +0200 Subject: [PATCH 2/2] fix lint --- cli/src/ios/update.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/ios/update.ts b/cli/src/ios/update.ts index 844793574..eb33e441f 100644 --- a/cli/src/ios/update.ts +++ b/cli/src/ios/update.ts @@ -343,7 +343,7 @@ function filterARCFiles(plugin: Plugin) { function removeNoSystem(library: string, sourceFrameworks: Array) { const libraries = sourceFrameworks.filter(framework => framework.includes(library)); - return libraries.length == 0; + return libraries.length === 0; } async function getPluginsTask(config: Config) {