获得错误“没有这样的模块”使用Xcode,但框架就在那里 [英] Getting error "No such module" using Xcode, but the framework is there

查看:92
本文介绍了获得错误“没有这样的模块”使用Xcode,但框架就在那里的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用Swift编码,我遇到了错误:

I'm currently coding in Swift, and I've got an error:


没有这样的模块社交

No such module Social

但我不明白,因为该模块在我的项目中,在链接框架和库和嵌入式二进制文件中声明。

But I don't understand, because the module is in my project, declared in "Linked frameworks and Libraries" and in "Embedded Binaries".

框架在Objective-C中,所以我为它写了一个Bridge Header。

The frameworks is in Objective-C, so I wrote a Bridge Header for it.

请问,我怎么能让Xcode识别框架?

Please, how can I make Xcode recognize the framework?

推荐答案

我不确定为什么会这样,但解决问题的一种方法是进入构建设置并定义 F ramework搜索路径到包含相关框架的文件夹。如果框架放在项目目录中,只需将框架搜索路径设置为 $(SRCROOT)并将其设置为递归。

I'm not sure why this happens, but one way to solve your issue is to go into your build settings and defining the Framework Search Paths to a folder which contains the frameworks in question. If the frameworks are placed in your project directory, simply set the framework search path to $(SRCROOT) and set it to recursive.

这篇关于获得错误“没有这样的模块”使用Xcode,但框架就在那里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆