.app file not found in Derived Data .app file not found in Derived Data xcode xcode

.app file not found in Derived Data


This happens when you rename the main target, and the test target hasn't been updated. Check the build settings in the test target and make sure the paths are pointing to the new folders. For example, if you renamed the target SuperAwesome to just Super, your test target is expecting files in SuperAwesome.app/ folder when it should be updated to Super.app/


Ok, the clue, while difficult to spot, is that the message you posted above isn't one building your app, but your unit tests. It also mentions it at the top of your output window, but one doesn't expect that to change.

You've possibly renamed your scheme, and in doing so the unit test is pointing to your real build or something else. Your app may well actually have built fine, but its your unit test target that fails.

If the problem is that you've been renaming targets then in your UnitTest scheme, go to build settings and search for TEST, which should bring up the settings for TEST HOST. Make sure these values are pointing to whatever you want the test app to be called and not the main executable.

For me it was just a case of appending "test" onto both the debug & release setting of my test target's TEST_HOST.

It all builds for me now, though annoyingly it is actually building both targets - at least they both compile.


So for anyone else who finds this and is frustrated what I ended up doing was deleting the target dependencies for both my app and the unit tests and then building the app once, then re-adding them and building the app again, and it worked fine.