0

Usually I am using CocoaPods (with use_frameworks!) in order to manage my frameworks, but this PDF library (FastPdfKit) does not support CocoaPods, so i added it manually in "link binary with libraries" along with its dependencies. After that I let xcode create a bridging header for me (I created a .m file, and xcode created a bridging header automatically).

I imported the header in the bridging file like this #import <FastPdfKit/FastPdfKit.h>, but I can't acces any method/class from my swift files... (Use of undeclared type 'ReaderViewController' where ReaderViewController is a subclass of UIViewController in the framework).

I've also tried importing like this #import 'FastPdfKit.h" still gives the same errors.

Vlad Dinu
  • 152
  • 2
  • 7

1 Answers1

0

To import Objective-C code into Swift from the same framework, go to Build Settings > Packaging and make sure the Defines Module setting for that framework target is set to “Yes”.

Luiz Dias
  • 1,947
  • 17
  • 22