0

I'm building a Firebase app in swift, I installed the cocoa pod correctly then created an Objective-C file so it would make me a bridging header. When I try to import Firebase elsewhere in the app it says no such module found. I tried to build anyway because sometimes the error will go away but it failed.

Should I do something with my build settings? I've created bridging headers before and never had too (I thought Xcode did that automatically). I'm using version 7.2.1 (the latest) by the way.

Thanks for the help!

#ifndef FirebaseNetwork_Bridging_Header_h
#define FirebaseNetwork_Bridging_Header_h

#import <Firebase/Firebase.h>

#endif
4

2 回答 2

1

firebase 的文档说要在 swift 中使用 import Firebase。然而,这会在编译时导致错误。添加桥接头并在其中导入 Firebase.h 后,您将能够在 swift 文件中访问 Firebase api。

于 2016-02-22T18:40:31.483 回答
0

确保在您的 Podfile 中插入以下行:

use_frameworks!

然后打开 .xcworkspace 文件。清理构建。编译它。

于 2016-02-23T03:22:26.580 回答