How does Embedded Frameworks in the jucer work

I have it set like this:

But it still appear red in Xcode and I get this error:

Ok, managed to add it.

../../../common/Source/3rd_party/REX/Mac/Deployment/REX Shared Library.framework

The comment says:

You will probably need to add an entry to the Framework Search Paths for each unique directory.

But the search path obviously isn’t checked

Ok, still not solved. Doing the above, it ads the framework to the project, but it doesn’t link:

Ld /Users/rrabien/dev.github/waveform/waveform/waveform12/Builds/MacOSX/build/Debug/Waveform\ 12\ (64-bit).app/Contents/MacOS/Waveform\ 12\ (64-bit) normal (in target 'Waveform - App' from project 'Waveform')
    cd /Users/rrabien/dev.github/waveform/waveform/waveform12/Builds/MacOSX
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target x86_64-apple-macos10.9 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -L/Users/rrabien/dev.github/waveform/waveform/waveform12/Builds/MacOSX/build/Debug -L../../../common/Source/3rd_party/elastique_pro/lib/osx/intel -L../../../common/Source/3rd_party/AutomapSDK/lib/MacOSX -F/Users/rrabien/dev.github/waveform/waveform/waveform12/Builds/MacOSX/build/Debug -filelist /Users/rrabien/Library/Developer/Xcode/DerivedData/Waveform-ckhckmoehjnpyxdyhbdcktqgkhrd/Build/Intermediates.noindex/Waveform.build/Debug/Waveform\ -\ App.build/Objects-normal/x86_64/Waveform\ 12\ \(64-bit\).LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../Frameworks -Xlinker -object_path_lto -Xlinker /Users/rrabien/Library/Developer/Xcode/DerivedData/Waveform-ckhckmoehjnpyxdyhbdcktqgkhrd/Build/Intermediates.noindex/Waveform.build/Debug/Waveform\ -\ App.build/Objects-normal-asan/x86_64/Waveform\ 12\ \(64-bit\)_lto.o -Xlinker -no_deduplicate -Xlinker -debug_variant -stdlib\=libc++ -fsanitize\=address -lelastiquePro -lelastiqueEfficient -lelastiqueSOLOIST -lResample -lzplVecLib -lAutomapClient -framework AudioUnit -framework Accelerate -framework AudioToolbox -framework AVFoundation -framework AVKit -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreAudioKit -framework CoreMedia -framework CoreMIDI -framework DiscRecording -framework Foundation -framework IOKit -framework OpenGL -framework QuartzCore -framework Security -framework WebKit -framework REX\ Shared\ Library -Xlinker -dependency_info -Xlinker /Users/rrabien/Library/Developer/Xcode/DerivedData/Waveform-ckhckmoehjnpyxdyhbdcktqgkhrd/Build/Intermediates.noindex/Waveform.build/Debug/Waveform\ -\ App.build/Objects-normal-asan/x86_64/Waveform\ 12\ \(64-bit\)_dependency_info.dat -o /Users/rrabien/dev.github/waveform/waveform/waveform12/Builds/MacOSX/build/Debug/Waveform\ 12\ \(64-bit\).app/Contents/MacOS/Waveform\ 12\ \(64-bit\)

ld: framework not found REX Shared Library
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ok, now I get in, in the first box you put the folder

../../../common/Source/3rd_party/REX/Mac/Deployment/

and in the second box you put the folder again + library name

../../../common/Source/3rd_party/REX/Mac/Deployment/REX Shared Library.framework

FWIW I was able to add an embedded framework (using a relative path) without specifying anything in the framework search paths field.

Hi,
I could embed REX library with your way into my plugin.
And debug build works fine, however when I export release build plugin, hosts don’t load the plugin.
Do I need to do other things for the release build?

Did you add the path for both the Debug and Release exporter in the Projucer?
You might also need to do a copy step so that the framework is available according to the @rpath the Release plugin might look for the .framework at. Since .frameworks don’t typically go into plugin folders, you might need to install the .framework into a System folder instead (rpaths always include these by default).

I added the path to the “Embedded Frameworks” filed.
When building the release version, the framework is copied under the plugin contents like this.
framework
But it seems the release plugin can’t find it.

Hello this is Gulshan Negi
Well, embedded frameworks in JUCE refer to additional libraries or modules that are incorporated into a JUCE project, and they can be created as separate projects and then included as dependencies within the main project. The JUCE Projector provides a simple way to set up and manage these dependencies, and JUCE’s build system will automatically compile and link the framework’s source code and libraries when building the project. This feature is useful for developers who want to add additional functionality to their JUCE projects, such as audio processing or custom GUI widgets.
Thanks

It may be that the @rpath is not set correctly to pick up the .framework from this location. There is a tool you can use to manually correct the rpath I think, or else you could try putting the .framework in a system folder to see if it can find it there.

I put the .framework to Library > Frameworks folder.
And now the release plugin can find it.
However I want to load it from Frameworks folder inside of the plugin contents.
Plugin > contents > Frameworks (from here)

Yes, as mentioned you will need to modify the rpath so that the list of possible locations to load the .framework from includes that location.

In some cases a build setup (it is possible using CMake) will do this automatically. In others (I have read about but not tried myself yet), you will need to use a tool to manually set the rpath to include your desired location.

I found the following using Google: macos - how to change RPATH on OS X - Stack Overflow