diff --git a/cli/src/ios/update.ts b/cli/src/ios/update.ts index e8d0e773c6..eb33e441f6 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);