I'm using Carthage and faced with strange problem. I have framework inside my app:
Mac-mini:Test test$ ls /Users/test/Library/Developer/CoreSimulator/Devices/C0CAD8E2-9371-47AE-855F-601FE289C585/data/Containers/Bundle/Application/1B18764D-EC63-4BF1-AC65-68ADDB714996/Test.app/Frameworks/
TestKit.framework
libswiftCore.dylib
libswiftCoreImage.dylib
libswiftDispatch.dylib
libswiftObjectiveC.dylib
libswiftContacts.dylib
libswiftCoreGraphics.dylib
libswiftDarwin.dylib
libswiftFoundation.dylib
libswiftUIKit.dylib
Mac-mini:Test test$ ls /Users/test/Library/Developer/CoreSimulator/Devices/C0CAD8E2-9371-47AE-855F-601FE289C585/data/Containers/Bundle/Application/1B18764D-EC63-4BF1-AC65-68ADDB714996/Test.app/Frameworks/TestKit.framework/
Headers
Info.plist
Modules
TestKit
_CodeSignature
But when I try to start my app in simulator, I'm getting this error:
dyld: Library not loaded: @loader_path/../Frameworks/TestKit.framework/TestKit
Referenced from: /Users/test/Library/Developer/CoreSimulator/Devices/C0CAD8E2-9371-47AE-855F-601FE289C585/data/Containers/Bundle/Application/51AECF63-CF31-4D69-821B-52571D64ED0B/Test.app/Test
Reason: image not found
Problem was in framework build. In target settings you have to set special parameter LD_DYLIB_INSTALL_NAME
to correct value. In my case it was set to @loader_path
value.