node-xcode icon indicating copy to clipboard operation
node-xcode copied to clipboard

addStaticLibrary problem

Open aylarov opened this issue 8 years ago • 4 comments

Hi, I've been trying to use the addStaticLibrary func and had some issues with it:

  1. I'm not sure about if (this.hasFile(file.path)) return false; code, since if the lib exists the function just returns false , if I change it to if (!this.hasFile(file.path)) return false; then
  2. In addToLibrarySearchPaths function there is the following code: if (unquote(buildSettings['PRODUCT_NAME']) != this.productName) continue;

in case of React Native iOS project (I've added fhe file) , this.productName is always $(TARGET_NAME) and continue doesn't happen only for the test target, while happens for the main target, so library isn't added to the main target Library Search Path.

project.txt

aylarov avatar May 13 '16 06:05 aylarov

Bounty added for this issue: https://www.bountysource.com/issues/34187955-addstaticlibrary-problem

grigoryvp avatar Jun 09 '16 12:06 grigoryvp

Bounty increased to $100

grigoryvp avatar Jun 14 '16 08:06 grigoryvp

Ok, I figured out the problem productName getter returns the first found PRODUCT_NAME from configurations, which is $(TARGET_NAME) in case of React Native project and refers to Test target. I will modify addToLibrarySearchPaths function to add path to lib search paths for all targets and make pull request.

aylarov avatar Jul 06 '16 14:07 aylarov

@imhotep , please let me know what's required to have this in the next release.

aylarov avatar Jul 18 '16 12:07 aylarov