0

I have an objective-c project. It is about two years that I am working on it. Now I want to do new works with Swift.

I added a new Swift class. Xcode asked me to add BridggingHeader file and I pressed YES.

but now in the bridging header file I want to import my current objective-c classed but this file do not recongize my objective-c files.

For example when I write:

#import "MYBaseViewController.h"

xcode shows error and says:

MYBaseViewController.h file not found
Andriy Gordiychuk
  • 6,163
  • 1
  • 24
  • 59
Husein Behboudi Rad
  • 5,434
  • 11
  • 57
  • 115

1 Answers1

0
  1. Check that bridging header is set correctly for each target by going to Build Settings.
  2. Make sure that the file is included in both targets. Select it in the Project Navigator and then open File Inspector and check target Membership section:

enter image description here

Andriy Gordiychuk
  • 6,163
  • 1
  • 24
  • 59