Xcode keeps prompting telling me I don\'t have a certain image in the project and it errors when I try to build. If I deleted the .png Xcode is complaining about from the pr
perhaps you move the file named **-Prefix.pch,you can change the dictionary of the file ,do like this : the error about “no such file or directory”
Using XCode 10, I got this error after deleting some files I no longer needed in my project. In my case, I went to XCode, clicked on the project name, then under Resources, the missing files were listed in red. All I did was to delete them.
In case you need the files, you will need to add them by going to File ->Add files to , then select the files. After selecting the file, make sure you have Copy files if needed checked.
Hope that helps someone.
HappyCoding
try set target CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS=NO
Okay here's the unsatisfactory workaround that fixed it for me.
(First, note that when I right-clicked my dodgy Group in the Project Navigator) it looked like any other group except that Open in External Editor was greyed - weird eh?)
I closed XCode and restarted it.
=> Now I see all of the icons under the offending group are red (in the Project Navigator)
Delete the entire group.
Create a new group (same name) and drag-drop the icons from the original source into the group
=> Error failed to copy (or some such - I can't remember but I have seen and fixed this before - and seen it elsewhere on SO)
This error is due to leftover icons, so to fix this one now,
I deleted all other groups with icons and moved their icons to trash
make a new group again, and drag all the icons in _again.
whew, now hit Builder
=> XCode crashes.
Lovely.
Restart Xcode
=> it works. Brief celebration and back to work.
(See what I mean about unsatisfactory)
Check your project file paths. If there is a space in any of the folders, it causes this error. Simply remove spaces.
look up here XCode Build – CopyPNGFile Error and No Such File or Directory . I had same problem and this solution helps me.
If you receive either of these annoying errors when building your xcode app, something has corrupted in your project bundle.
- Open your project in Xcode
- Click on your project
- Click on your project under Targets
- Hit the build phases tab
- Open “Copy Bundle Resources” near the bottom
- Look for any resources listed in red!