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.
要将Objective-C代码从同一框架导入Swift,请转至Build Settings > Packaging
并确保该框架目标的Defines Module
设置被设置为“ Yes ”。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.