Skip to main content
Kelvas blog
  1. Posts/

iOS: Executable not found 😨

·299 words·2 mins

I’m sure that like me, you have already had strange errors with XCode. What do I mean by “strange”? Well, the error is not clear and does not seem possible. Let me explain.

Error #

I was developing a new SwiftUI application when I got the following error when launching the application on an emulator:

Error: Executable Not found

How can the compilation be successful while not finding the executable? Very strange I think. But that was without seeing the little pop-up that opened when clicking on the Details button:

Error code 5

As you can read it indicates that the path to the application is not valid.

How to solve the problem? #

Clean up the DerivedData folder #

My first instinct is always to clean up the DerivedData folder to start over with a clean build, with no steps that could have failed and compromised the application.

In this case it didn’t work.

Issue navigator #

It is still very strange that the compilation works but not the start of the application, especially when it seems to be corrupted:

But if we look at the error panel we find this:

Compilation errors

I don’t understand why XCode shows that the build is a success when there are errors but these are already clearer than the previous one. And indeed, when you look at the file explorer, you can see that one is missing:

Missing files

A bad Git manipulation on my part, so no big deal, just put the file back in its place and everything will be back in order.

Conclusion #

It is still very strange that XCode shows a success on the compilation of the project while it has errors. But note for later: always look at the issue navigator first.

Sources #