Cannot import Firebase in Swift app
You shouldn't need to use a Bridging Header.
The Firebase SDK uses Swift module mapping, so you'll have to let CocoaPods know.
Use this podfile:
use_frameworks! # this allows you to use import Firebase
pod 'Firebase', '>= 2.5.0'
Then you should be able to use import Firebase
in any Swift file.
Sometimes after opening from CocoaPods install, XCode can get confused. Do a Cmd+K
to clean and a Cmd+Shift+R
to rebuild. If that still is giving you errors, then restart Xcode and try the clean and build again.
Cannot import Firebase sdk in Swift app
The Firebase SDK heavily changed on May 16, 2016. This changed the names of the pods and their respective functionality.
The new pod name for the standard Firebase SDK is Firebase/Core
, which includes only Firebase Analytics. If you're upgrading from the old Firebase system, you probably only need these:
pod 'Firebase/Core' # Firebase Analytics
pod 'Firebase/Database' # Firebase Realtime Database
pod 'Firebase/Auth' # Firebase Authentication
If you're using other Firebase functionality, refer to https://firebase.google.com/docs/ios/setup for other podnames. Don't forget that regardless of what you choose, you need to include Firebase/Core
.
Related Topics
Constant Movement in Spritekit
Combining 'And' and 'Or' Condition in Nspredicate
Maximum Number of Peripherals on Corebluetooth
How to Identify iOS Device Uniquely
iOS Swift: How to Change the Font Style of a Certain Word in a String
Mfmailcomposeviewcontroller Crashes Because of Global Appearance Properties on iOS6
How to Convert an Pffile to an Uiimage with Swift
Uilabel Text Truncation VS. Line Breaks in Text
How to Launch the iOS Simulator from Terminal
App Delegate Methods Aren't Being Called in iOS 13
Core Text Calculate Letter Frame in iOS
iPhone Uibutton - Image Position
Programmatically Get Height of Navigation Bar
iOS Multiline Label in Interface Builder
Xcode - How to Drag a Component from One View to Another Without Losing Its Frame