I am getting the following error when building in Xcode 10.0 with swift 4.2:
I tried going to Compile Sources
in the Build Phases
tab and deleting and re-adding the selected file (and cleaning and rebuilding)but it didn't work :( Instead, this following answer worked for me if you get the 'Build input file cannot be found' error message:
.mlmodel
) and I selected "Copy items if needed" under Destination.Cmd-shift-k
to clean and then Cmd-b
to build
and voila! The file was recognized and error gone!Hope this helps!
For me something totally different worked:
Go to Target>Build Settings>Architectures
My valid architectures before: arm64 arm64e armv7 armv7s (Defaults)
Changed it to: armv7 i386 arm64 armv7s
If all else fails:
Had the same problem with swift files. Select files that are not recognised and Delete with Remove Reference
option. Right click in the folder and Add files again.
I got this error when i renamed a ViewController name using "Refactor". The view controller name occurrences were changed but an old reference was somewhere still existing.
Deleting derived data & Clean build folder worked for me.
Here's how to delete Derived data:
File>Workspace settings> Click arrow & remove all folders inside Derived Data.
A most common error when you move Info.plist in another folder. To fix this error you can select the Info.plist and choose Relevant to Project from file inspector.
Next step, go to Build settings and search for info.plist and fix the file path.