Reputation: 371
This is what happens:
Then I added the Database framework
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?
Upvotes: 37
Views: 26752
Reputation: 1311
This is probably too late but if you are sure your podfile is correct and your app has been building before. When this error just comes out of the blue, remember that the other thing can go wrong is your Xcode's incremental build folder.
Try this:
Hopefully you'd be fine then.
Upvotes: 1
Reputation: 21
import FirebaseCore
Adding this to the top of the class resolved the issue for me.
FirebaseCore version: 6.29.0
Upvotes: 1
Reputation: 306
In my case it I needed to import FirebaseCore
instead of import Firebase
or import FirebaseRemoteConfig
.
Upvotes: 4
Reputation: 714
For those facing the issue with RemoteConfig configuration, adding an extra import:
import FirebaseRemoteConfig
helped in my case
Upvotes: 1
Reputation: 1964
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]
Upvotes: 78
Reputation: 11
It worked for me with
pod repo update
pod update
and then run this at the location of the pod file:
pod install
After rebuilding my app the error should be gone.
Upvotes: 1
Reputation: 69
I put in 'Firebase' along w/ 'Firebase/Core' in the podfile and it worked for me
Upvotes: 2
Reputation: 567
import FirebaseCore
Then you could use FirebaseApp.configure()
. I'm using swift 4.
Upvotes: 50
Reputation: 161
That work today for me:
1. in Xcode 9.1
import UIKit
import Firebase
import UserNotifications
import FirebaseInstanceID
import FirebaseMessaging
import FirebaseCrash
import FirebaseAnalytics
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
return true
}
2. My PodFile
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
pod 'FirebaseUI', '~> 4.0'
pod 'Firebase/Auth'
pod 'Firebase/Messaging'
3. finale:
pod repo update
pod update
4. restart xcode:
5. press: shift-alt-command-k (in xcode)
This will delete all of the products and intermediate files in the build folder.It's different from delete derive data.
6. an clean
done
Upvotes: 5
Reputation: 842
Replace pod 'Firebase/Core'
with pod 'Firebase'
.
Then run pod repo update
.
Upvotes: 6
Reputation: 519
use FIRApp.configure() instead of Firebase.configure()
Upvotes: 14
Reputation: 3256
Sounds like you might be using an older version of Firebase. Try -
pod repo update
pod update
Double check Firebase 4.0 is being installed.
Also try importing the specific modules. So instead of
import Firebase
use import FirebaseDatabase
or import FirebaseAuth
.
Upvotes: 27