Redefinition of module 'Firebase' in Swift 3
Asked Answered
Z

1

6

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.

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.

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

Any help?

Zelazny answered 29/5, 2017 at 5:33 Comment(6)
Can you paste the complete error ?Biosphere
"Redefinition of module 'firebase'." This is complete error which Im getting. Yeah one more thing bellow this error it was saying that "previously it was declared here." And when I click on the error, it opens module.modulemap file.Zelazny
search "firebase" in whole Project You find 2 times import. delete one.Barfuss
Can you try to create a new project and test it.Biosphere
I tried searching "firebase" in whole Project but didn't find import more than 1 time i.e AppDelegate.Zelazny
We have thought of creating a new project and test it. So we will do it in sometime.Zelazny
S
8

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

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.

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

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

And voilà :)

I hope this will help you.

Sap answered 3/11, 2017 at 6:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.