Xcode: Library Not found error

Hello,

I am new to writing Xcode applications. I am trying to add a few frameworks and libraries into Xcode. as mentioned in the following document: https://docs.baslerweb.com/pylonapi/cpp/pylon_programmingguide#common-settings-for-building-applications-with-pylon-macos

When I am trying to run the code, the following error appears, the same type of error is also appearing when I am trying to run opencv applications by adding those libraries into my Xcode. Kindly help me with how can I resolve this error as quickly as possible.

Library not loaded: @rpath/pylon.framework/Versions/A/pylon

  Referenced from: /Users/Username/Library/Developer/Xcode/DerivedData/Pylon_code-abcnbtqdoxsiwldjlsuzgzbiiehb/Build/Products/Debug/Pylon_code

  Reason: tried: '/Users/username/Library/Developer/Xcode/DerivedData/Pylon_code-abcnbtqdoxsiwldjlsuzgzbiiehb/Build/Products/Debug/pylon.framework/Versions/A/pylon' (no such file), '/Library/Frameworks/pylon.framework/Versions/A/pylon' (code signature in <8D7F01D7-33D8-33CD-9D80-5E4111B12F2D> '/Library/Frameworks/pylon.framework/Versions/A/pylon' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/Library/Frameworks/pylon.framework/Versions/A/pylon' (code signature in <8D7F01D7-33D8-33CD-9D80-5E4111B12F2D> '/Library/Frameworks/pylon.framework/Versions/A/pylon' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/Library/Frameworks/pylon.framework/Versions/A/pylon' (code signature in <8D7F01D7-33D8-33CD-9D80-5E4111B12F2D> '/Library/Frameworks/pylon.framework/Versions/A/pylon' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/System/Library/Frameworks/pylon.framework/Versions/A/pylon' (no such file)

(lldb) 

Also, I am facing the following error when I run opencv application in Xcode: dyld[11847]: Library not loaded: /usr/local/opt/opencv/lib/libopencv_gapi.405.dylib Referenced from: /Users/username/Library/Developer/Xcode/DerivedData/OPENCV-gzbfcbghvwzksbemedqwzlposgfn/Build/Products/Debug/OPENCV Reason: tried: '/Users/username/Library/Developer/Xcode/DerivedData/OPENCV-gzbfcbghvwzksbemedqwzlposgfn/Build/Products/Debug/libopencv_gapi.405.dylib' (no such file), '/usr/lib/system/introspection/libopencv_gapi.405.dylib' (no such file), '/usr/local/opt/opencv/lib/libopencv_gapi.405.dylib' (code signature in '/usr/local/Cellar/opencv/4.5.5_3/lib/libopencv_gapi.4.5.5.dylib' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/usr/local/lib/libopencv_gapi.405.dylib' (code signature in '/usr/local/Cellar/opencv/4.5.5_3/lib/libopencv_gapi.4.5.5.dylib' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/usr/lib/libopencv_gapi.405.dylib' (no such file), '/Users/username/Library/Developer/Xcode/DerivedData/OPENCV-gzbfcbghvwzksbemedqwzlposgfn/Build/Products/Debug/libopencv_gapi.4.5.5.dylib' (no such file), '/usr/lib/system/introspection/libopencv_gapi.4.5.5.dylib' (no such file), '/usr/local/Cellar/opencv/4.5.5_3/lib/libopencv_gapi.4.5.5.dylib' (code signature in '/usr/local/Cellar/opencv/4.5.5_3/lib/libopencv_gapi.4.5.5.dylib' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/usr/local/lib/libopencv_gapi.4.5.5.dylib' (code signature in '/usr/local/Cellar/opencv/4.5.5_3/lib/libopencv_gapi.4.5.5.dylib' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/usr/lib/libopencv_gapi.4.5.5.dylib' (no such file) Message from debugger: Terminated due to signal 6 Program ended with exit code: 6

Kindly help me with understanding what could be the root cause for such an error and how can I mitigate this.