Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems after upgrading to Xcode 10: Build input file cannot be found

Tags:

xcode

upgrade

People also ask

How do I fix Xcode file not found?

Delete the files from the xcode project navigator (only deleting references). Add them again to the project (dragging from finder into the project navigator).

Where is the project navigator in Xcode?

The Project navigator displays your project's files and lets you open, add, delete, and rearrange those files. To open the Project navigator, at the top of your project window's navigator area, click the icon that resembles a file folder.

How do I get to build phases in Xcode?

To view the build phases for a target, select the target and navigate to the Build Phases tab, as shown in the following figure. To add a new build phase, click the Add button (+) and select an appropriate build phase from the pop-up menu. Xcode disables any menu options that aren't valid.


Try to switch back to the Legacy Build System (File > Project Settings > Workspace Settings > Legacy Build System)


For Swift files or files that belong to the project such as:

Build input file cannot be found: PATH/TO/FILE/FILE.swift

This issue can happen when files or folders have been removed or moved in the project.

To fix it:

  1. Go in the project-navigator, select your project

  2. Select Build Phasestab

  3. In Compile Sources section, check for the file(s) that Xcode is complaining of

  4. Notice that the file(s) have the wrong path, and delete them by clicking on the minus icon

  5. Re-add the file(s) by clicking the plus icon and search in the project.

  6. Product > Clean Build Folder

  7. Build

You generally find these missing files in the Recovered References folder of Xcode in the project tree (look for the search bar at the bottom-left of Xcode and search for your complaining file):

Deleting them from this folder can also solve the error.


For me In Xcode 10, this solution worked like a charm. Just go to the Recovered References folder and remove all files in red color and add it again with proper reference. If Recovered References folder was not found: Check for all missing files in the project (files in red colour) and try to add files references again.

enter image description here


This worked for me in Xcode 10:

  • Click Project icon/name in your Xcode project
  • Go to General tab
  • Click [Choose info.plist File] under Identity section
  • Select the info.Plist file
  • Check Info tab to see if info.plist was loaded successfully
  • Build and run