Cannot find dynamic library in Xcode

Hello,

I have a problem in the Xcode 15.0 where the custom Dynamic library cannot be found during build. The dynamic library is built for iOS 16 and I have added it to "Link Binary with Libraries" and also to "Embed Libraries" as Destination: Framework. In the General->Frameworks, Libraries and Embedded Content I can see the library is loaded and "Embhed&Sign" option is set. In Build Settings the "Library search path" is also set to the location of library "$(PROJECT_DIR)/test/lib"

Library is available in this location: $(PROJECT_DIR)/test/lib

I can build the project without any issues. But when I try to run the application, I get below error:

dyld[1076]: Library not loaded: libtest-xx.dylib
Referenced from: <4A9...>
Reason: tried: '/usr/lib/system/introspection/libtest-xx.dylib' (no such file, not in dyld cache
//libtest-xx.dylib' (no such file)

Can anyone please let me know what is the issue here and how to correctly bundle dynamic library with the application?

Thanks in advance