Skip to content

Commit

Permalink
fix(cordova): Add lib prefix to .a library names (#2636)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Mar 25, 2020
1 parent 7692ee4 commit 2be4a92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions cli/src/ios/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ async function generateCordovaPodspec(cordovaPlugins: Plugin[], config: Config,
const sourceFiles = getPlatformElement(plugin, platform, 'source-file');
sourceFiles.map((sourceFile: any) => {
if (sourceFile.$.framework && sourceFile.$.framework === 'true') {
const fileName = sourceFile.$.src.split('/').pop();
let fileName = sourceFile.$.src.split('/').pop();
if (!fileName.startsWith('lib')) {
fileName = 'lib' + fileName;
}
const frameworktPath = join(sourcesFolderName, plugin.name, fileName);
if (!sourceFrameworks.includes(frameworktPath)) {
sourceFrameworks.push(frameworktPath);
Expand Down Expand Up @@ -270,8 +273,11 @@ function copyPluginsNativeFiles(config: Config, cordovaPlugins: Plugin[]) {
}
const sourcesFolder = join(pluginsPath, sourcesFolderName, p.name);
codeFiles.map( (codeFile: any) => {
const fileName = codeFile.$.src.split('/').pop();
let fileName = codeFile.$.src.split('/').pop();
const fileExt = codeFile.$.src.split('.').pop();
if (fileExt === 'a' && !fileName.startsWith('lib')) {
fileName = 'lib' + fileName;
}
let destFolder = sourcesFolderName;
if (codeFile.$['compiler-flags'] && codeFile.$['compiler-flags'] === '-fno-objc-arc') {
destFolder = 'noarc';
Expand Down

0 comments on commit 2be4a92

Please sign in to comment.