Getting Started
Clone and open Database quickstart project
- Clone the quickstart repo and
cd
into thedatabase/DatabaseExampleSwiftUI/DatabaseExample
directory. - Open file
DatabaseExample.xcodeproj
project using Xcode.
$ git clone https://github.com/firebase/quickstart-ios.git
$ cd database/DatabaseExampleSwiftUI/DatabaseExample
$ open DatabaseExample.xcodeproj
- Once the
.xcodeproj
is opened, update to the latest Swift Package Versions: go to the menu bar, click on File > Swift Packages > Update to Latest Package Versions
Connecting to the Firebase Console
- To have a functional application, you will need to connect the Database quickstart example with the Firebase Console.
- For an in-depth explanation, you can read more about adding Firebase to your iOS
Project. Below is a summary of the main steps:
- Visit the Firebase Console
- Add an iOS app to the project. Make sure the
Bundle Identifier
you set for this iOS App matches that of the one in this quickstart. - Download the
GoogleService-Info.plist
when prompted. - Drag the downloaded
GoogleService-Info.plist
into the opened quickstart app under theShared
folder.
- Create a Database and update the rules to database rules.
- Now you should be able to build and run the Firebase project!
Navigation Bar Issue on tvOS
When using earlier versions of xcode (12.5 or below) there is a bug where SwiftUI toolbar disappears after navigation on tvOS. This issue is resolved when using the latest version of xcode (13.5 or above).