-lswiftVision not found during linking

I have a react-native library in my swift project.

The library is objective-c (react-native-camera) with added swift components requiring and importing vision.

The project and target are set for all architectures (including arm64), also they build for all architectures and not just the current one.

Vision is properly link in build rules of the app target (since there is no linking in static library) (even without vision in the build rules linker will fail) but i have a linker error during compilation :

library not found for -lswiftVision for architecture arm64

Cannot seem to find the root cause of this, never had any issue in a swift project so i have no clue.

It seems the linker is looking for a library version of the vision framework ?


Managing to advance a bit,


'@import Vision;'


In the main.h file of the library seems to fix the library not found, but i have another one instead :


'library not found for -lswiftSwiftOnoneSupport for architecture arm64'


It seems something fishy is going on during the linking of the project.

Replies

For anyone interested the solution was to create an empty swift file in the parent objective-c projet, xcode seems to fail to import swift frameworks properly without this.