251

How can I resolve this warning?

[WARN]warning: no rule to process file '$(PROJECT_DIR)/MyApp/MessageCell.h' of type sourcecode.objj.h for architecture i386

Elise van Looij
  • 4,162
  • 3
  • 29
  • 52
Sheehan Alam
  • 60,111
  • 124
  • 355
  • 556
  • It also says that it is trying to compile your header files as sourcecode.objj.h from Objective-J (which also uses .h files for headers), do you have Cappuccino installed? – themarketka Oct 05 '11 at 08:17

5 Answers5

587

Click on your project, and check that this file is not present in the tab Build Phases. Normally no header files should stay here. Clean and build it again, it should work!

Giuseppe
  • 6,666
  • 2
  • 20
  • 32
  • 1
    i have a few headers files in there. Just curious, why shouldn't headers be there? – Sheehan Alam Jun 28 '11 at 17:39
  • 30
    Because this is the list of source files that will be compiled, and _normally_ you have already included .h inside your .m – Giuseppe Jun 28 '11 at 18:55
  • 1
    Whenever I create a new class, my XCode is automatically adding the header files to my build phases. I don't know why, anyone has a clue why this happens? Currently each time I create a new class I need to delete the header files from the build phases manually. – Bocaxica Nov 09 '12 at 18:55
  • 1
    I might add that a .h file may appear in the build phases (when it's not supposed to) because the .m file has (by mistake) a different name. – Ali Oct 11 '13 at 15:07
  • this'd make perfect sense... I had created the file originally as a .cpp then renamed it to a .h – ddavison Mar 10 '14 at 12:54
  • I have the same issue, however I only have .m files in build phases. No problem if i386 arch is removed. – sebrock Sep 15 '14 at 11:48
36

Graphical guide for Xcode 4.x to remove this warning:

http://joytek.blogspot.tw/2011/09/xcode-4-warning-no-rule-to-process-file.html

tzuchien.chiu
  • 700
  • 6
  • 11
20

We can resolve this issue by simply following the steps below:- Some .md, .mdown .h files are included in the Compile Sources
Step 1) Select Project Navigator
Step 2) Select your project
Step 3) Select your targetStep
Step 4) Select Build PhasesStep
Step 5) Move files which we don't want the compiler to process from Compile Sources to Copy Bundle Resources

Check this

Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92
Sudheesh
  • 483
  • 6
  • 20
4

If you are getting this warning from your cocoapod you ned to make sure the s.source_files is set correctly in the .podspec.

For example I originally included all files with this line in my .podspec

s.source_files = "MyUIElements/**/*"

I was getting this compilation warning for some font files I had in the pod. You control which files show up in BuildPhases -> CompileSources on pod consumption like this:

s.source_files = "MyUIElements/**/*.swift", "MyUIElements/**/*.h"
Jon Vogel
  • 5,244
  • 1
  • 39
  • 54
1

My problem was't header files because under Target > Build Phases > Compile Resources there weren't any .h files to begin with. The system was complaining about some other files. I followed this link which basically said delete the files the system was complaining about but instead I cntrl + dragged them to Copy Bundle Resources.

The easiest way to search for the files is to use the Filter in the upper right hand corner:

enter image description here

Here are the directions from the link:

enter image description here

Lance Samaria
  • 17,576
  • 18
  • 108
  • 256