Build input file cannot be found: in my app derived data folder in Xcode 12.5.1 in m1

While running the app from Xcode, I am getting an error as the Build input file cannot be found.

I have tried deleting the DerivedData folder entirely and re-run the app.

Added arm64 and x86_64 in the Excluded architecture. But the error is still not resolved. Any workarounds.

Note: It occurs when archiving as well as when I try to run the app in simulator as well

Showing All Errors Only
Build input file cannot be found: '/Users/name/Library/Developer/Xcode/DerivedData/application-dhdivlzaazbgnkkglsibo/Build/Products/Debug-iphonesimulator/Application.app/Application'
OS: macOS Big Sur (m1)
Version: 11.3.1

Replies

Added arm64 and x86_64 in the Excluded architecture.

You should undo this. Setting anything in the Excluded architectures is almost always wrong except in carefully considered situations.

Build input file cannot be found: '/Users/name/Library/Developer/Xcode/DerivedData/application-dhdivlzaazbgnkkglsibo/Build/Products/Debug-iphonesimulator/Application.app/Application

One of your build phases has a reference to the built app binary as an input. When you cleared DerivedData, this file was deleted, and so now the build can't proceed because it's missing. Look through all of your build phases as well as the Xcode file navigator for any file references that refer to these files and remove them.

  • @edford Thanks for your response. Could you please clarify this as well? You should undo this. Setting anything in the Excluded architectures is almost always wrong except in carefully considered situations.

    Here I am using an old Framework in my project, it does not work in the arm64. So I have added this in the Excluded Architecture. But the same will work in other lower versions of Xcode. As per your workarounds here I do not need to add the Excluded archs in the project. Am I correct?

    One of your build phases has a reference to the built app binary as an input. When you cleared DerivedData, this file was deleted, and so now the build can't proceed because it's missing. Look through all of your build phases as well as the Xcode file navigator for any file references that refer to these files and remove them.

    Shall I need to check this in the Build Phases under Compile Sources files? But I not found the file name as the error in app. It is the first build in my machine with Xcode 12.5.1

  • @edford If I have removed the ProductName acrchive got succeeded. But he ipa not available. If i try to build in the simulator, it shows the error as Users/name/Library/Developer/Xcode/DerivedData/app-hbaothuchbdcaldinphltth/Build/Products/Debug-iphonesimulator/.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 settings to ensure that a valid executable will be built.

  • Has anyone found a solution to this? I have trying to solve this issue for two days now. I still have not found a way to get a successful build using MacOS 15 and Xcode 13.1... Started the project on my iMac M1 but moved to an older computer since I thought it was chip related...

I moved in new Mac MPRo from Intel chip when I try to run on Simulator it is fine, not working for real device Has anyone found a solution to this?

Did you make sure that the executable file "Application" located in your folder "/Users/name/Library/Developer/Xcode/DerivedData/application-dhdivlzaazbgnkkglsibo/Build/Products/Debug-iphonesimulator/Application.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 it was wrong in the Info file. Correcting it fixed the issue for me.

See the the screenshot below :