iiiivaska
iiiivaska

Reputation: 353

Build input file cannot be found {PATH} did you forget to declare this file as an output

After creating and deleting the Objective-C file with the header, an error appeared. How can I fix it?

error build: Build input file cannot be found:
'/Users/iiiivaska/Desktop/To-Do List/To-Do List/View/Cells/To-Do List-Bridging-Header.h'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

Upvotes: 35

Views: 118302

Answers (9)

Simran Singh Sandhu
Simran Singh Sandhu

Reputation: 501

Clearing derived worked for me. When you update pods with the project already in cache, it sometimes give us this error, so close the project, clear the derived data folder, not just the project's folder, and then open -> Clean -> Build

Upvotes: 1

islam XDeveloper
islam XDeveloper

Reputation: 500

Problem : When move folder to other folder . Solve : back the old folder to the same place before .

Upvotes: -1

matijahhh
matijahhh

Reputation: 51

So I had the same problem with Xcode because I renamed my project.

I fixed it by editing the project.pbxproj file in the other editor, in Xcode it was uneditable. I had to replace the occurrences of the old project name with the new project name. Don't forget to replace the occurrences of the project name variant with the _ in the name as it is also mentioned in that file.

Upvotes: 1

bruno55
bruno55

Reputation: 46

Check the compile sources section and if the file pointed out in the error is greyed out remove it. This solved it for me.

Based on this previous answer: React Native Production Build Error ('Build input file cannot be found: {path}ExpoModulesProvider.swift')

Upvotes: 0

Elmar
Elmar

Reputation: 4397

Happened with my Flutter app:

../Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.m Build input file cannot be found: ../ios/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.m'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

Seems like it is just pod related false error message of XCode. After spending quite considerable time to debug it, the solution was to use these Flutter commands:

flutter clean
flutter pub get
cd ios
pod install

Upvotes: 1

advait raman
advait raman

Reputation: 11

I fixed it by closing the simulator that I had running

Upvotes: 0

Luis Pereira
Luis Pereira

Reputation: 340

I got the same issue but I just forgot to run "pod install" after some manipulation with project deps:-)

Upvotes: 14

Mark Fahim
Mark Fahim

Reputation: 61

Please, make sure from your path on build setting section.

1- Go to target

2- check deployment section => deployment assets to be "your path/Preview Content"

3- check packaging section => Info.plist file to be "your path/Info.plist"

4- signing section => Code Signing Entitlements to be "your path only"

Upvotes: 6

Oleksandr Bielov
Oleksandr Bielov

Reputation: 199

Seems like you have moved bridging file to other folder and Xcode compiler can not find it. Try to move this file in the top of your files tree

Upvotes: 16

Related Questions