无法集成Firebase iOS SDK - 架构x86_64的未定义符号: [英] Cannot integrate Firebase iOS SDK - Undefined symbols for architecture x86_64:

查看:126
本文介绍了无法集成Firebase iOS SDK - 架构x86_64的未定义符号:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图将这个 SDK 安装到我的iOS项目中,但没有取得多大成功。

I've been trying to get this SDK installed into my iOS project without much success.

首先,我尝试使用此处的设置说明手动安装它: https://firebase.google.com/docs/ios/setup#initialize_firebase_in_your_app

At first, I tried to install it manually, using the setup instructions from here: https://firebase.google.com/docs/ios/setup#initialize_firebase_in_your_app

但是,在完全遵循自述文件文件后,当我尝试使用此代码时:

However, after following the readme file exactly, when I try use this code:

[FIRApp configure];

Firebase.h 导入标题后文件,它无法识别 FIRApp ,原因似乎是我从框架中遗漏了文件 FIRApp.h 标题中不存在。

After importing Firebase.h into the header file, it doesn't recognise the FIRApp and the reason seems to me missing files from the framework as FIRApp.h doesn't exist in the headers.

所以,我采用了非常讨厌的 Cocoapods 安装。在 pod安装部分期间,一切安装正常并且没有警告显示。但是,当我添加以下代码时: [FIRApp configure]; 我出现了一个不同的错误:

So, I resorted to the much-hated, Cocoapods installation. Everything installs fine and no warnings show during the pod install part. However, again, when I add the following code: [FIRApp configure]; I am present with a different error:

架构x86_64的未定义符号:

_ OBJC_CLASS _ $ _ FIRApp,引自:
Appjlec中的objc-class-ref

Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FIRApp", referenced from: objc-class-ref in AppDelegate.o

对于我的生活,我无法弄清楚这一点。我用各种解决方案搜索了Google和SO,但没有帮助。

For the life of me, I cannot figure this out. I have searched Google and SO with various solutions that haven't helped.

我想让它与Cocoapods一起工作,因为我已经完成了现在安装它所需的全部工作。

I would like to get it working with Cocoapods as I have done all the leg work with getting it installed now.

推荐答案

首先,在项目根目录下尝试 pod update 命令。如果您看到类似目标的警告会覆盖在...... 中定义的OTHER_LDFLAGS构建设置,请检查目标的构建设置。你会在那里找到其他链接器标志属性。将其值设置为 $(继承)

First, try pod update command on your project root directory. If you see a warning there similar to target overrides the OTHER_LDFLAGS build setting defined in ..., check your Target's Build Settings. You'll find a Other Linker Flag property there. Set its value as $(inherited).

这解决了我的问题。

这篇关于无法集成Firebase iOS SDK - 架构x86_64的未定义符号:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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