Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 (beta) breaks my iOS HEADER_SEARCH_PATHS #121

Open
chris-praxis opened this issue May 9, 2024 · 3 comments
Open

v2 (beta) breaks my iOS HEADER_SEARCH_PATHS #121

chris-praxis opened this issue May 9, 2024 · 3 comments

Comments

@chris-praxis
Copy link

chris-praxis commented May 9, 2024

ENVIRONMENT
macOS Sonoma (14.4.1)
Xcode 15.3
NS 8.7.0
@nativescript/ios 8.7.1
@nativescript/canvas 2.0.0-beta.21
@nativescript/canvas-three 2.0.0-beta.21

PROBLEM
In "App_Resources/iOS/build.xcconfig" I set HEADER_SEARCH_PATHS (including $(inherited)), which is necessary for my native code. @nativescript/canvas also sets HEADER_SEARCH_PATHS (including $(inherited)) in "node_modules/@nativescript/canvas/platforms/ios/build.xcconfig". I'm guessing this is what causes the problem...

fatal error: 
      'include_path/some_header.hpp' file not found

My native code longer compiles until I manually add headers search paths in Xcode. Setting HEADER_SEARCH_PATHS in "App_Resources/iOS/build.xcconfig" no longer works.

@triniwiz
Copy link
Member

triniwiz commented May 9, 2024

Thank you for reporting, if possible can you submit a small app which reproduces the issue.

@chris-praxis
Copy link
Author

Hi @triniwiz,

Test app download is large due to OpenCV: https://drive.google.com/file/d/19Dixw0ktbKdiwG2NF9EaCJ41pXfZnLMW/view?usp=sharing

The error

ios_header_search_test/App_Resources/iOS/src/OpenCV_test.cpp:1:10: fatal error: 'opencv2/opencv.hpp$
#include <opencv2/opencv.hpp>
         ^~~~~~~~~~~~~~~~~~~~

is caused by adding @nativescript/canvas beta, but I suspect it is more of a build issue. Although my HEADER_SEARCH_PATHS and the one in the plug-in both include $(inherited), my paths are not in the resulting Xcode project.

$ ns plugin
Dependencies:
┌──────────────────────┬────────────────┐
│  Plugin               │  Version        │
│  @nativescript/canvas │  ^2.0.0-beta.21 │
│  @nativescript/core   │  ~8.8.0         │
│  @nativescript/theme  │  ~3.0.2         │
│  nativescript-vue     │  ~2.9.3         │
└──────────────────────┴────────────────┘
Dev Dependencies:
┌────────────────────────────────────┬─────────┐
│  Plugin                             │  Version │
│  @nativescript/ios                  │  8.7.2   │
│  @nativescript/webpack              │  ~5.0.0  │
│  nativescript-vue-template-compiler │  ~2.9.3  │
└────────────────────────────────────┴─────────┘

@triniwiz
Copy link
Member

Thanks will check this out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants