When I created my iOS project, I opted not to include UI tests. Now, though, I tried to add them, but I get the following error when I try to execute them:
dyld: Library not loaded: @rpath/FrameworkBeingTested.framework/FrameworkBeingTested
Referenced from: <redacted>/TargetApplication.app/TargetApplication
Reason: image not found
I've confirmed that:
Test
scheme,TargetApplication
), andFrameworkBeingTestedUITests
target.I found the answer when I changed the UI test files' target membership to FrameworkBeingTestedTests
, instead of FrameworkBeingTestedUITests
:
Aha! The problem was that my FrameworkBeingTested
had iOS 8.0 as its minimum target, but Apple's UI testing framework requires iOS 9.0 or newer. But instead of telling me that, the compiler told me that it couldn't load the tested library. I'll file a radar for this.
Hope this helps someone!