Clone and open Database quickstart project
- Clone the quickstart repo and
- Open file
DatabaseExample.xcodeprojproject using Xcode.
$ git clone https://github.com/firebase/quickstart-ios.git $ cd database/DatabaseExampleSwiftUI/DatabaseExample $ open DatabaseExample.xcodeproj
- Once the
.xcodeprojis 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 Identifieryou set for this iOS App matches that of the one in this quickstart.
- Download the
- Drag the downloaded
GoogleService-Info.plistinto the opened quickstart app under the
- 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).