Receiver ‘Example’ for class message is a forward declaration??

When met with this error in ObjC project while compiling, it means:

Example class is declared by @class in its invoker's class header but not directly #import.

We have 2 ways to solve this problem:

  • Directly declare Example class by #import “Example.h” in the header.
  • Add a method to return specific Example you want in invoker’s class header. (use this way if you use both ObjC and Swift and Example is a Swift class in a framework project.)

XCode Framework Issues

Image not found - runtime

Under framework settings of the target, set Embed as Embed and Sign or Embed without Sign

Can't build module or
Umbrella header doesn't include xxx header or 
xxx header must be imported from module xxx before it is required

Check this framework’s dependencies (e.g. Check pod file to get the dependency list if you use Cocoapods), make sure they are OK under your current project environment.

Can't find xxx header

Check your framework/header searching path.