You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by dp...@apache.org on 2026/03/02 17:38:22 UTC
(cordova-ios) branch master updated: fix(xcode): Fix library search paths for target (#1618)
This is an automated email from the ASF dual-hosted git repository.
dpogue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git
The following commit(s) were added to refs/heads/master by this push:
new 1788102f fix(xcode): Fix library search paths for target (#1618)
1788102f is described below
commit 1788102f1508dcd7728524eb5ef48b11065ecea6
Author: Darryl Pogue <da...@dpogue.ca>
AuthorDate: Mon Mar 2 09:38:16 2026 -0800
fix(xcode): Fix library search paths for target (#1618)
Closes GH-1617.
---
lib/plugman/pluginHandlers.js | 4 +++-
tests/spec/Plugman/pluginHandler.spec.js | 10 ++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/lib/plugman/pluginHandlers.js b/lib/plugman/pluginHandlers.js
index a465cd3f..cb4209c9 100644
--- a/lib/plugman/pluginHandlers.js
+++ b/lib/plugman/pluginHandlers.js
@@ -291,7 +291,9 @@ function installHelper (type, obj, plugin_dir, project_dir, plugin_id, options,
const opt = { weak: obj.weak };
const project_relative = path.join(path.basename(project.xcode_path), project_ref);
project.xcode.addFramework(project_relative, opt);
- project.xcode.addToLibrarySearchPaths({ path: project_ref });
+
+ const searchPath = `"$(SRCROOT)/$(TARGET_NAME)/${path.dirname(project_ref)}"`;
+ project.xcode.addToLibrarySearchPaths(searchPath);
} else {
project.xcode.addSourceFile(project_ref, obj.compilerFlags ? { compilerFlags: obj.compilerFlags } : {});
}
diff --git a/tests/spec/Plugman/pluginHandler.spec.js b/tests/spec/Plugman/pluginHandler.spec.js
index e362075e..1d84ed4f 100644
--- a/tests/spec/Plugman/pluginHandler.spec.js
+++ b/tests/spec/Plugman/pluginHandler.spec.js
@@ -89,6 +89,7 @@ describe('ios plugin handler', () => {
beforeEach(() => {
spyOn(dummyProject.xcode, 'addSourceFile');
+ dummyProject.xcode.updateBuildProperty('PRODUCT_NAME', '"TestCordovaApp"', null, 'App');
});
it('Test 001 : should throw if source-file src cannot be found', () => {
@@ -138,6 +139,15 @@ describe('ios plugin handler', () => {
.toHaveBeenCalledWith(path.join('App', 'Plugins', dummy_id, 'SourceWithFramework.m'), { weak: false });
});
+ it('should update library search paths when element has framework=true set', () => {
+ const source = copyArray(valid_source).filter(s => s.framework);
+
+ spyOn(dummyProject.xcode, 'addFramework');
+ install(source[0], dummyPluginInfo, dummyProject);
+
+ expect(dummyProject.xcode.getBuildProperty('LIBRARY_SEARCH_PATHS', undefined, 'App')).toContain(`"$(SRCROOT)/$(TARGET_NAME)/Plugins/${dummy_id}"`);
+ });
+
it('should not add source files for SPM plugins', () => {
const source = copyArray(swiftpackagePluginInfo.getSourceFiles('ios'));
install(source[0], swiftpackagePluginInfo, dummyProject);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org