Skip to content

Introduction to Firebase. In this app we will cover Authentication, Database and Storage.

Notifications You must be signed in to change notification settings

alexpaul/Firebase-Demo

Repository files navigation

Firebase - Getting Started

Introduction to Firebase. In this app we will cover Authentication, Firestore and Storage.

Running this app

In order to run this app please do the following:

  1. Clone this project to your machine.
  2. Using your google sign in account, navigate to the Firebase console and create a Firebase project.
  3. Go through the project creation steps below.
  4. Download and add the GoogleService-Info.plist file to your Xcode project.
  5. At this point you will be able to successfully run this project.

See lecture videos for more

app screenshot

Marketplace app

marketplace app

Firebase

App Features

  • user can sign in
  • user can create a new account
  • user can sign out
  • user can create an item
  • user can view an item
  • app stores user profile photos
  • app stores item photos
  • user can change profile photo and display name
  • user can delete ONLY their created item (security rules)
  • set security rules to prevent user from deleting items that wasn't created by them
  • user can see a specific user's items
  • can add a comment to an item (firebase subcollections)
  • can query (filter) for a specific category of items
  • user can favorite an item from the item feed

1. Sign up using your Google account and create a Firebase Project

Firebase Console

firebase console

2. Part 1 of 3 of creating a Firebase project

firebase project part 1

3. Part 2 of 3 of creating a Firebase project

firebase project part 1

4. Part 3 of 3 of creating a Firebase project

firebase project part 1

5. Project created

firebase project part 1

6. Firebase console

In the left column are the services available from Firebase. In this course we will be using Authentication, Database and Storage.

firebase project part 1

7. Let's now add the Firebase project to our iOS app

Click on the iOS button to start the process integrating the Firebase project with your Xcode project. This will be make possible with a created GoogleService-Info.plist file.

firebase project part 1

8. Add the bundle identifier from Xcode to your Firebase project

The bundle identifier is critical in associating your Xcode project with the Firebase project.

firebase project part 1

firebase project part 1

9. If your Github repository is public add your GoogleService-Info.plist to .gitignore

.gitignore file

GoogleService-Info.plist

10. Download the GoogleService-Info.plist file

Download the GoogleService-Info.plist file and add it to your Xcode project.

firebase project part 1

11. Add the Firebase SDK using CocoaPods to your project

Initialize pod into your project by running pod init in Terminal. Open your Podfile and add pod 'Firebase/Analytics' to it and run pod install. At this point closse Xcode and now you will have an xcworkspace you will be editing from now on. This xcworkspace will have your Xcode project along with the Pods that were installed.

firebase project part 1

12. Dependencies for Firebase installed

firebase project part 1

13. Initialize Firebase into your Xcode project

Open your xcworkspace and Edit the AppDelegate as pictured below:

firebase project part 1

14. App is verified from Firebase servers as being now connected

To verify all went well with the Firebase integration, delete the app and re-run it after adding Firebase configuration in the AppDelegate, wait a few moments for the Firebase server to detect the connection. If all went well you will receieve the verification banner below. Congratulations. 🥳

firebase project part 1

Resources

  1. Firebase iOS Documentation
  2. Firebase
  3. Firebase Console
  4. Firebase Authentication
  5. Firebase Firestore
  6. Firebase Storage
  7. What is Firebase?

About

Introduction to Firebase. In this app we will cover Authentication, Database and Storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published