A very good old blog post by Mike Ash and one by Dave Dribin explain the history behind @rpath. But today, we can forget the sordid history. To use @rpath, simply make the following Build Settings:
• In the framework target that needs to be loaded, set Installation Directory to @rpath. (*)
• In the target that needs to load the framework, add to its Runpath Search Paths the relative path from the its executable, which in this context is called the loader, to the framework, denoting the starting point by the symbol @loader_path. It makes sense if you think about it! For the typical example of an application executable in Contents/MacOS which needs to load a framework in Contents/Frameworks, the answer is: @loader_path/../Frameworks.
* It seems to me that the example Apple’s Dynamic Library Programming Topics > Run-Path Dependent Libraries > Using Run-Path Dependent Libraries, which says to use @rpath/MyFramework.framework/Versions/A/MyFramework, is either wrong or confusing.