skip to Main Content

I’ve an error with xcode 13. When i try to run my app on a real device (arm64 architecture) i got the following error:

Executable Not Found

Domain: DVTMachOErrorDomain

Code: 5

Recovery Suggestion: /path/to/file/MyApp.app is not a valid path to an executable file. Please rebuild the project to ensure that all required executables are created. Check your project setting to ensure that a valida executable will be built.

has anyone ever had this problem? The build process finish without errors. Right now i’ve excluded x86_64 architecture from "Excluded Architectures" option and set the parameter "Architectures" to "Standard Architectures (arm64, armv7)".

14

Answers


  1. Perhaps the executable file entry is wrong in your Info.plist?

    The entry Executable file should be set to $(EXECUTABLE_NAME).

    Login or Signup to reply.
  2. TARGET -> Build Settings, search ‘VALID’.

    Set VALID_ARCHS, add x86_64 if run with a simulator, else set arm64.

    Login or Signup to reply.
  3. Targets -> Build Settings, search plist

    Set Generate Info.plist File to No, set Info.plist File with your info.plist file path.

    That’s works for me.

    Login or Signup to reply.
  4. I got the same error and it was just because I didn’t change the build settings correctly after I renamed the folder where Info.plist belongs to.

    So I needed to change this setting so that it was the same with the actual path of Info.plist:
    enter image description here

    Login or Signup to reply.
  5. Did you make sure that the executable file MyApp located in your folder /path/to/file/MyApp.app/ matches the value of the Executable file attribute in your Info project file?

    On my machine, the executable path is : /Users/.../DerivedData/Debug-iphonesimulator/Runner.app/Runner. I noticed that the executable name (Runner in my case) was wrong in the Info file. Correcting it fixed the issue for me.

    See the the screenshot below :

    enter image description here

    Login or Signup to reply.
  6. Check if there are any deleted files(which happens when you pull the code from Git) and add those files back, Close Xcode, Restart the system, Clean the Project and Run the Project this Worked for me.

    Login or Signup to reply.
  7. I had this error as well.
    This is not a blanked solution fix.

    For me Xcode had some broken references to files, so I had to connect them and set the file location to be "relative to group" vs "relative to project"

    The error was being incorrectly reported as "Executable not found" when building the error was more clear.

    Build input file cannot be found: ‘/Users/MY_USER_NAME/Programs/ios/PROJECT_DIR/SRC/file.xib’ is not found.

    Login or Signup to reply.
  8. I faced the same problem and resolved it by deleting files and folders below,

    Pods ,
    Podfile.lock and
    mme.xcworkspace

    And running pod install

    Login or Signup to reply.
  9. This Error occur because there was a missing file.

    Click on the Error icon on the top header and you redirect to errors there you notice there are some files that are not there or missing.

    Added the file and run your project again working correctly.

    Login or Signup to reply.
  10. I encountered this issue just now after setting up a new prefix header to my product target with a wrong file path:

    $(SRCROOT)/$(PROJECT_NAME)/PrefixHeader.h
    

    Correct it to

    $(SRCROOT)/$(PROJECT_NAME)/PrefixHeader.pch
    

    resolved my issue. What a stupid Xcode!

    Login or Signup to reply.
  11. pod install or pod install --repo-update should work !

    Login or Signup to reply.
  12. For me, I removed the files in Recovered Reference folder. Then this error gone.

    Login or Signup to reply.
  13. Some file is missing, you just have to add from project folder. Just restart your Mac and open XCode with your project, you will see the missing file.
    I have previously tried every possible solution like cleaning derived data, running pod install but nothing worked. Try above solution

    Login or Signup to reply.
  14. Fast forward to 2022, I got this error after having installed a TestFlight version and was trying to run from Xcode. I deleted the app off my phone, ran again, and was able to install successfully. I hope this helps someone!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search