尽管导入了Firebase.framework,但找不到头文件(FirebaseCore/FirebaseCore.h) [英] Header file (FirebaseCore/FirebaseCore.h) not found, despite importing Firebase.framework

查看:906
本文介绍了尽管导入了Firebase.framework,但找不到头文件(FirebaseCore/FirebaseCore.h)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的iOS应用程序中手动导入和使用Firebase框架.我将从基本的最低限度Google Analytics(分析)框架开始(然后再添加其余框架).

I am trying to manually import and use the Firebase framework in my iOS application. I am starting off with the basic bare minimum Analytics framework (then I'll add the rest of the frameworks).

我按照以下教程进行了手动操作将Google Firebase框架导入到我的Xcode项目中.问题是我仍然遇到以下错误:

I followed this tutorial in order to manually import the Google Firebase framework into my Xcode project. The problem is that I am still getting the following error:

找不到"FirebaseCore/FirebaseCore.h"文件

'FirebaseCore/FirebaseCore.h' file not found

我已经导入了框架,导入了整个头文件,并确保将文件实际复制到项目目录文件夹中.

I have imported the frameworks, imported the overall header file and have made sure that the files where actually copied to the project directory folder.

我也设置了-ObjC链接器标志.

I have set the -ObjC linker flag too.

还有其他人设法将Google Firebase框架手动导入其Xcode项目吗?我想念什么?

Has anyone else managed to manually import the Google Firebase framework into their Xcode project? What am I missing?

注意:我对使用CocoaPods完全不感兴趣,我只想要简单的老式方法.

Note: I am not interested in using CocoaPods at all, I just want the simple old fashioned approach.

推荐答案

有两个问题:

1)Google Developer网站上说明的手动导入框架的说明有些含糊.因此,我遵循以下教程来导入框架并设置我的开发人员帐户: http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/

1) The instructions stated on the Google Developer website for importing the frameworks manually, are somewhat lacklustre. So I followed the following tutorial to import the frameworks and setup my developer account: http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/

2)导入所有框架/资源/plist文件/等之后,您仍然会遇到以下构建错误:

2) After you have imported all the frameworks/resources/plist files/etc... you will still get the following build error:

找不到"FirebaseCore/FirebaseCore.h"文件

'FirebaseCore/FirebaseCore.h' file not found

为了解决此问题,请清洁您的Xcode项目,然后关闭该项目.然后重新打开该项目并重新生成它.现在可以正常工作-也许Xcode项目现在可以看到框架文件或某些东西了……不确定,但这是唯一对我反复起作用的解决方案.

In order to get around this issue, clean your Xcode project and then close the project. Then reopen the project and rebuild it. It will now work - perhaps the Xcode project can now see the framework files or something... not really sure, but it's the only solution that has repeatedly worked for me.

更新

我认为这只是Xcode 9.x的一个错误,自从我升级到Xcode 10以来,我就再也没有这个问题了.只需照常导入所有框架,然后构建并运行项目即可.

I think this was just a bug with Xcode 9.x, ever since I upgraded to Xcode 10, I haven't had this issue at all. Just import all the frameworks as usual and build and run the project.

这篇关于尽管导入了Firebase.framework,但找不到头文件(FirebaseCore/FirebaseCore.h)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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