jpd
jpd

Reputation: 381

Xcode file not found

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"

for above file it gives error.

#import "FrameSection.h"
#import "FreeCropIphone5.h"
#import "DoodleView.h"

Please help me.

Upvotes: 10

Views: 39268

Answers (6)

vsandeepraju
vsandeepraju

Reputation: 129

Clean the build folder by pressing ⌘ + ⇧ + 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.

Upvotes: 9

chickengirl
chickengirl

Reputation: 1

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.

Upvotes: 0

quarac
quarac

Reputation: 3483

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!

Upvotes: 1

Aqib Mumtaz
Aqib Mumtaz

Reputation: 5064

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.

enter image description here

Upvotes: 2

Buntylm
Buntylm

Reputation: 7373

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

Upvotes: 4

Maen
Maen

Reputation: 10698

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.

Upvotes: 0

Related Questions