在Swift 3中重新定义模块“Firebase”

时间:2022-06-01 20:34:22

Earlier, I had tried to integrate firebase in Xcode project manually but couldn't add it successfully. So Now I tried integrating firebase with cocoa pod but it resulted in build fail.

之前,我曾尝试手动将firebase集成到Xcode项目中,但无法成功添加。所以现在我尝试将firebase与cocoa pod集成在一起,但是它导致了构建失败。

There are two pods which I have installed

我已经安装了两个吊舱

  • Firebase/core

    重火力点/核心

  • Firebase/messaging.

    重火力点/消息传递。

I have deleted old firebase.h file which was added in the process manually linking firebase to project.

我已经删除了旧的firebase。在过程中添加的h文件,将firebase手动连接到项目。

I clean & build but still this Redifinition error is comming.

我清理和构建,但这个重定义错误仍在继续。

Any help?

任何帮助吗?

1 个解决方案

#1


1  

Look in your project at the "Header Search Path" parameter, check if your project includes the "Firebase" directory (directly or by recursion).

在“标题搜索路径”参数中查看项目,检查项目是否包含“Firebase”目录(直接或递归)。

In my case, my problem was that I had kept both old versions of Firebase (4.3.0 and 4.5.0) in this directory, so both versions were taken into account by Xcode.

在我的例子中,我的问题是我在这个目录中保留了两个旧版本的Firebase(4.3.0和4.5.0),所以Xcode考虑了这两个版本。

This causes the error "Redefinition of module 'Firebase'".

这会导致错误“重新定义模块‘Firebase’”。

If you are in the same situation, the solution is to delete the oldest version of Firebase.

如果您处于相同的情况,解决方案是删除最老版本的Firebase。

And voilà :)

瞧:)

I hope this will help you.

我希望这能对你有所帮助。

#1


1  

Look in your project at the "Header Search Path" parameter, check if your project includes the "Firebase" directory (directly or by recursion).

在“标题搜索路径”参数中查看项目,检查项目是否包含“Firebase”目录(直接或递归)。

In my case, my problem was that I had kept both old versions of Firebase (4.3.0 and 4.5.0) in this directory, so both versions were taken into account by Xcode.

在我的例子中,我的问题是我在这个目录中保留了两个旧版本的Firebase(4.3.0和4.5.0),所以Xcode考虑了这两个版本。

This causes the error "Redefinition of module 'Firebase'".

这会导致错误“重新定义模块‘Firebase’”。

If you are in the same situation, the solution is to delete the oldest version of Firebase.

如果您处于相同的情况,解决方案是删除最老版本的Firebase。

And voilà :)

瞧:)

I hope this will help you.

我希望这能对你有所帮助。