compilation warning: no rule to process file for architecture i386

76,068

Solution 1

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!

Solution 2

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

Solution 3

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

Solution 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"
Share:
76,068

Related videos on Youtube

Sheehan Alam
Author by

Sheehan Alam

iOS, Android and Mac Developer. i can divide by zero.

Updated on July 04, 2020

Comments

  • Sheehan Alam
    Sheehan Alam almost 4 years

    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

    • themarketka
      themarketka over 12 years
      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?
  • Sheehan Alam
    Sheehan Alam almost 13 years
    i have a few headers files in there. Just curious, why shouldn't headers be there?
  • Giuseppe
    Giuseppe almost 13 years
    Because this is the list of source files that will be compiled, and normally you have already included <file>.h inside your <file>.m
  • Bocaxica
    Bocaxica over 11 years
    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.
  • Ali
    Ali over 10 years
    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.
  • ddavison
    ddavison about 10 years
    this'd make perfect sense... I had created the file originally as a .cpp then renamed it to a .h
  • sebrock
    sebrock over 9 years
    I have the same issue, however I only have .m files in build phases. No problem if i386 arch is removed.
  • hstdt
    hstdt over 6 years
    or s.source_files = "Sources**/*.{h,m,swift}"?