So if you're including your .dylib within the framework directory, now you just need to run the "install_name_tool
" to point your app to that dylib within the application package, instead of "/usr/lib
".
To do this, add a "Run Script" build step after the compiling and linking has finished. And in this build phase, the script will be as simple as:
install_name_tool -id @executable_path/../Frameworks/libusb-1.0.2.dylib path/to/your/project/libusb-1.0.2.dylib
The tutorial I'm looking at can be found here. I hope this helps you out!