.app file not found in Derived Data

后端 未结 7 1486
傲寒
傲寒 2021-01-01 19:59

When trying to compile my project I am getting this error and am wondering if anyone knows how to fix it?

I\'ve read every answer on SO and elsewhere on the interne

相关标签:
7条回答
  • 2021-01-01 20:21

    Try duplicating the target, and run using the target's copy.

    0 讨论(0)
  • 2021-01-01 20:21

    Try to run Clean and then Build/Run the project

    0 讨论(0)
  • 2021-01-01 20:22

    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/

    0 讨论(0)
  • 2021-01-01 20:25

    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.

    0 讨论(0)
  • 2021-01-01 20:35

    I hate Mach-o linker errors, its frustrating, anyway, I faced the same issue by creating a new scheme, it worked like magic for me.

    0 讨论(0)
  • 2021-01-01 20:36

    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.

    0 讨论(0)
提交回复
热议问题