I am getting the following error when building in Xcode 10.0 with swift 4.2:
Build input file cannot be found
How to fix this issue?
My Approach:
1.From Project Navigator ->Files ->Add Files to Lowes ->In Finder View, check to which folder this lost referenced file is moved to and check with your team members if anyone moved it for a reason.If it occurred by mistake then follow below steps
2.From Project navigator, directly tap on the file which is causing issue.This is the same file that XCode shows as not found in error .So clearly this file has lost reference and we need to restore it back
3.The Swift bird folder icon appears in light red color which is an indication of lost reference
4.Right click on it and Delete it
5.Next from Project navigator -> Files ->Add Files to Lowes -> Finder View go to the folder where this referenced file is moved to and tap on ADD button in popup window
6.Now if you look at the Project Navigator this file swift bird icon appears in bright red , but you will also find an extra file with the same name at the top of the Project Navigator
7.Make sure you have this file in the right folder if not move it to right folder
8.Now right click to delete the very top redundant file, here do not select " Move to Trash" option.Just select "Remove References" option
This fixed my issue.