canvas
canvas copied to clipboard
v2 (beta) breaks my iOS HEADER_SEARCH_PATHS
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.
Thank you for reporting, if possible can you submit a small app which reproduces the issue.
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 │
└────────────────────────────────────┴─────────┘
Thanks will check this out