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
Perhaps the executable file entry is wrong in your Info.plist?
The entry
Executable file
should be set to$(EXECUTABLE_NAME)
.TARGET -> Build Settings, search ‘VALID’.
Set VALID_ARCHS, add if run with a simulator, else set arm64.
Targets -> Build Settings
, searchplist
Set
Generate Info.plist File
toNo
, setInfo.plist File
with your info.plist file path.That’s works for me.
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
: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 :
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.
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.
I faced the same problem and resolved it by deleting files and folders below,
Pods
,Podfile.lock
andmme.xcworkspace
And running
pod install
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.
I encountered this issue just now after setting up a new prefix header to my product target with a wrong file path:
Correct it to
resolved my issue. What a stupid Xcode!
pod install
orpod install --repo-update
should work !For me, I removed the files in Recovered Reference folder. Then this error gone.
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
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!