简体   繁体   English

Xcode / Swift:没有这样的模块'GeoFire'

[英]Xcode / Swift: No such module 'GeoFire'

I have downloaded latest GeoFire framework v1.1.3 from here and dropped it in my Swift Xcode project but my import GeoFire statement is throwing 我从这里下载了最新的GeoFire框架v1.1.3并将其放入我的Swift Xcode项目中,但我的import GeoFire语句正在抛出

No such module 'GeoFire' 没有这样的模块'GeoFire'

This is very strange because a few minutes ago I did the same for Firebase framework and it is working fine. 这很奇怪,因为几分钟前我为Firebase框架做了同样的事情并且工作正常。 My target is iOS 8.0 and I believe I do not need Bridging header. 我的目标是iOS 8.0,我相信我不需要Bridging标头。

Framework is present in linked frameworks and libraries , Embedded Binaries and link binary with libraries . 框架存在于链接的框架和库嵌入式二进制文件链接二进制文件库中

If you are writing this in swift (its in your tags) you'll need to create a Bridging Header file to be able to expose the Objective C library to your swift code, importing the objective c library in the bridging header fie. 如果你用swift(它在你的标签中)写这个,你需要创建一个Bridging Header文件,以便能够将Objective C库暴露给你的swift代码,在桥接头文件中导入目标c库。 Here's a guide on how to do this 这是一个如何做到这一点的指南

Hope this solves your issue. 希望这能解决您的问题。

Try do it: https://youtu.be/009UrLVlAbo?t=67 but just change the import header file like this: 尝试这样做: https//youtu.be/009UrLVlAbo?t = 67,但只需更改导入头文件,如下所示:

#import <Firebase/Firebase.h>
#import <GeoFire/GeoFire.h>

On XCode 7.2, with Swift, and ran into this same issue when mixing Firebase and Google Analytics pods. 在XCode 7.2上,使用Swift,并在混合使用Firebase和Google Analytics pod时遇到同样的问题。

Firebase alone works fine with "use_frameworks!" 仅使用Firebase就能正常使用“use_frameworks!” in the Podfile, but Google Analytics pod install needs that line commented out. 在Podfile中,但Google Analytics pod安装需要注释掉该行。 So bridging header file is needed. 因此需要桥接头文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM