FirebaseUI is an open-source library for iOS that allows you to quickly connect common UI elements to the Firebase database for data storage, allowing views to be updated in realtime as they change, and providing simple interfaces for common tasks like displaying lists or collections of items.
Additionally, FirebaseUI provides modern SwiftUI authentication components that simplify Firebase authentication by integrating with common identity providers like Facebook, Twitter, Google, and Apple.
FirebaseUI clients are also available for Android and web.
FirebaseUI supports iOS 17.0+ and Xcode 15+.
For SwiftUI authentication and modern features, use Swift Package Manager:
- In Xcode, go to File > Add Package Dependencies
- Enter the repository URL:
https://github.com/firebase/FirebaseUI-iOS - Select the modules you need:
FirebaseAuthSwiftUI- Core SwiftUI authenticationFirebaseGoogleSwiftUI- Google Sign-InFirebaseFacebookSwiftUI- Facebook LoginFirebasePhoneAuthSwiftUI- Phone AuthenticationFirebaseAppleSwiftUI- Sign in with AppleFirebaseTwitterSwiftUI- Twitter LoginFirebaseOAuthSwiftUI- Generic OAuth providers
For UIKit data binding features (Database, Firestore, Storage), use CocoaPods:
# Only pull in Firestore features
pod 'FirebaseUI/Firestore'
# Only pull in Database features
pod 'FirebaseUI/Database'
# Only pull in Storage features
pod 'FirebaseUI/Storage'If you're including FirebaseUI in a project, make sure you also have:
platform :ios, '13.0'
use_frameworks!The READMEs for components of FirebaseUI can be found in their respective project folders.
If you'd like to contribute to FirebaseUI for iOS, you'll need to run the following commands to get your environment set up:
$ git clone https://github.com/firebase/FirebaseUI-iOS.git
$ cd FirebaseUI-iOS
# For SwiftUI components (uses Swift Package Manager)
$ cd samples/swiftui/FirebaseSwiftUISample
$ open FirebaseSwiftUISample.xcodeproj
# For UIKit data binding components (uses CocoaPods)
$ cd FirebaseDatabaseUI # or FirebaseFirestoreUI, FirebaseStorageUI
$ pod installFirebaseUI includes several sample projects demonstrating different features:
Located in samples/swiftui/FirebaseSwiftUISample/, this sample demonstrates the modern SwiftUI authentication components.
Configuration:
- Download
GoogleService-Info.plistfrom Firebase Console - Copy it to the sample project folder
- Update URL Types (for OAuth providers) in
Project Settings -> Info tab -> Url Types:REVERSED_CLIENT_ID(fromGoogleService-Info.plist) - Required for Google Sign-Infb{your-app-id}- Required for Facebook Login
- For Facebook Login, update
Info.plistwithFacebookAppIDand enable Keychain Sharing
Located in samples/objc/ and samples/swift/, these samples demonstrate FirebaseUI's data binding capabilities for Realtime Database and Storage.
Configuration:
- Download
GoogleService-Info.plistfrom Firebase Console - Copy it to
samples/objc/GoogleService-Info.plistorsamples/swift/GoogleService-Info.plist - Run
pod installin the sample directory - Configure your Firebase Database and Storage in the Firebase Console
- For the Chat sample, enable anonymous authentication in Firebase Console
- For the Storage sample, configure appropriate Storage Security Rules
We'd love to accept your sample apps and patches! Before we can take them, we have to jump a couple of legal hurdles.
Please fill out either the individual or corporate Contributor License Agreement (CLA).
- If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA] (https://developers.google.com/open-source/cla/individual).
- If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA] (https://developers.google.com/open-source/cla/corporate).
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests.
- Submit an issue describing your proposed change to the repo in question.
- The repo owner will respond to your issue promptly.
- If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above).
- Fork the desired repo, develop and test your code changes.
- Ensure that your code adheres to the existing style of the library to which you are contributing.
- Ensure that your code has an appropriate set of unit tests which all pass.
- Submit a pull request
