Xcode file not found

前端 未结 6 917
青春惊慌失措
青春惊慌失措 2021-01-17 22:16

I am facing an error of file not found.

I have added all necessary files, but it gives file not found for a file.

#import \"MagickWand.h\"


        
相关标签:
6条回答
  • 2021-01-17 22:45

    Check that your corresponding frameworks are included in your bundle.

    For that, access to your project settings, select your target, and under Build Phases, check on the "Link binaries with libraries" section that your frameworks are here.

    0 讨论(0)
  • 2021-01-17 22:51

    I dragged folder in XCode, it started appearing blue and files in that folder wasn't accessible in Project anywhere although they does exists in blue folder.

    Solution:
    

    I simply deleted that folder reference from project, created "New Group" and added files in it, its started working correctly.

    0 讨论(0)
  • 2021-01-17 22:54

    Use the search bar in the Target -> Build Phases window to make sure the missing file's .m is listed under the Compile Sources and the .h file is listed under the Copy Files. If it's not there, add it.

    I was able to fix this problem by adding the missing .h file.

    0 讨论(0)
  • 2021-01-17 22:55

    I was facing this error after a merge from the repository (git). The final solution was:

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

    Hope it helps!

    0 讨论(0)
  • 2021-01-17 23:00

    NOTE

    As According to this kind of problem the reason may be sometime due to cyclic import. means like you have a file with the name first.h and you importing second.h and in second.h you importing first.h and you not including first.h.

    Try these steps hope this will help you.

    target of project -> Build Phases -> Compile Sources ->

    delete the [found filename that cause the error in program].m

    Add it back again in you project.

    enter image description here

    Clean Your iOS project And then Build Again.

    enter image description here

    0 讨论(0)
  • Clean the build folder by pressing ⌘ + alt + ⇧ + k. It may help you to rectify the error caused.

    There can be many cases that cause this error. This is one of the option to clear that error.

    0 讨论(0)
提交回复
热议问题