问题描述
我正在构建一个框架,现在我需要在其中导入一些Objective-C框架,但我需要导入"Beaconstac.framework",但是由于我们无法在快速的框架项目中添加桥接头,所以我的问题是我在我的项目中使用了这个框架,但是在我尝试过的项目中无法直接访问
I am building a framework in which I need to import some objective-c frameworks for now I need to import "Beaconstac.framework" but as we can not add a bridging header in a swift framework project so my question is how can I use this framework in my project this is not directly accessible in my project I tried
但出现错误没有这样的模块"
but its giving error "No Such Module"
还有其他选择吗?
推荐答案
您需要在伞标头中导入Beaconstac框架.也就是说,如果您通常在Obj-C桥接标头中使用#import <Beaconstac/Beaconstac.h>
,对于框架,则需要将其放在伞状标头中.
You need to import the Beaconstac framework in your umbrella header. That is, if you'd ordinarily use, e.g., #import <Beaconstac/Beaconstac.h>
in an Obj-C bridging header, for a framework you need to put that in the umbrella header.
有关更多信息,请参阅Apple文档中的本章:
See this chapter in Apple's documentation for more info:
这篇关于将Objective-c框架导入Swift框架项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!