Firebase与Swift [英] Firebase with Swift

查看:106
本文介绍了Firebase与Swift的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将 firechat-ios 项目移植到Swift,并遇到一些问题。我想这可能只是要求Firebase人员对他们的SDK进行一些更新,但我想我仍然会问。添加Firebase及其依赖关系后,我无法成功构建项目。

I was attempting to port the firechat-ios project over to Swift and ran into some issues. I suppose this might just be requiring the firebase folks to make some update to their SDK, but I figured I would ask anyway. I wasn't able to successfully build my project after adding Firebase and its dependencies.

我得到一个警告:

I get a warning:

ignoring file /Users/n/Projects/SwiftChat/Firebase.framework/Firebase, missing required architecture x86_64 in file /Users/n/Projects/SwiftChat/Firebase.framework/Firebase (3 slices)

和两个错误:

and two errors:


_ OBJC_CLASS _ $ _ Firebase,引用自:
__TFC9SwiftChat14ViewControllercfMS0_FT7nibNameGSQSS_6bundleGSQCSo8NSBundle__S0_ in ViewController.o

"_OBJC_CLASS_$_Firebase", referenced from: __TFC9SwiftChat14ViewControllercfMS0_FT7nibNameGSQSS_6bundleGSQCSo8NSBundle__S0_ in ViewController.o

/ b>

And


linker命令失败,退出代码1(使用-v查看调用)

linker command failed with exit code 1 (use -v to see invocation)

有什么想法?

推荐答案

我设法让它工作。事实证明,firebase网站上的视频解释了哪些依赖包括过时了。我进一步阅读页面,看到Firebase实际上需要两个依赖,我失踪了。添加 libc ++。dylib libiucore.dylib CFNetwork.framework Security.framework SystemConfiguration.framework 一切正常。

I managed to get it working. It turns out that the video on the firebase website which explains which dependencies to include was out of date. I read further down the page and saw that firebase actually needs two dependencies that I was missing. After adding libc++.dylib, libiucore.dylib, CFNetwork.framework, Security.framework and SystemConfiguration.framework everything worked fine.

这篇关于Firebase与Swift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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