Framework not found X for architecture x86_64

This error happens when I try to run tests when using Carthage

This has happened to me a couple of times now and I keep forgetting how to fix it. So I thought I'd write it down here.

In your test target, add this to the Framework Search Paths...

$(PROJECT_DIR)/Carthage/Build/iOS

Or if you're on macOS:

$(PROJECT_DIR)/Carthage/Build/Mac

🎉