iOS Tips: Can't find a solution to import header files

introduction

Problem description: Unknown type name 'xxxx'

problem causes:

  1. cache causes
  2. Search Paths does not set the corresponding directory: for example, after pod install, the corresponding xcodeproj configuration is not modified
  3. When creating a new file, add the file to other targets: such as accidentally adding the file to the message push extension

insert image description here

Solution: First analyze and find the corresponding reasons, and then solve them accordingly.

I Analyze the cause of the problem

Analysis method: The enumeration uses the corresponding enumeration type, and the class is declared with ID or c@lass.

Change the class file imported in your .h to a @class declaration, and then import it in .m. Similarly, enumerations can be declared using the corresponding enumeration type, and classes can be declared using the corresponding enumeration type.

Guess you like

Origin blog.csdn.net/u011018979/article/details/123481149