I ran into this issue when I added an extension to XCTestCase in a library that I created. More specifically, I got the following runtime error:
dyld: Library not loaded: @rpath/libXCTestSwiftSupport.dylib
I'm not familiar with install_name_tool. Presumably I need to add /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/ and /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/ to my @rpath (what is this?). Can someone show me how to do this?