Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase (4.0.0): Use of unresolved identifier FirebaseApp when installing FirebaseDatabase

This is what happens:

  • running on Xcode Version 7.3.1 (7D1014)
  • pod 'Firebase/Core'
  • import Firebase in the Class

unresolved on Database

Then I added the Database framework

  • pod 'Firebase/Core'
  • pod 'Firebase/Database'

unresolved on FirebaseApp

It seems that the 2 frameworks are in mutex mode. They cannot coexist.

I have tried everything: update, install, uninstall, recreate the project, recreate the workspace. All.

May you help me. Is there a bug on last Firebase release?

like image 815
Giancarlo Marasso Avatar asked May 19 '17 19:05

Giancarlo Marasso


2 Answers

I had a similar issue.

Your import statement would be:

import Firebase

Make sure restart Xcode and to clean the build folder.

It's working for me & got rid of "Use of unresolved identifier FirebaseApp..." error

Update: For Swift 4.2: FirebaseApp.configure() does work. [FIRApp is renamed to FirebaseApp]

like image 120
Niraj Avatar answered Nov 06 '22 14:11

Niraj


import FirebaseCore

Then you could use FirebaseApp.configure(). I'm using swift 4.

like image 50
sonnet Avatar answered Nov 06 '22 14:11

sonnet