You're viewing the legacy docs. They are deprecated as of May 18, 2016.
These docs are for version 2.5.1 and below of the Objective-C SDK. Go to our current docs, or see our iOS migration guide.

Objective-C and Swift iOS Guide

Installation & Setup

In this document, we'll guide you though adding the Firebase iOS client library to your project. You can also use this client library to build native OS X applications.

Create an account

First sign up for a free account. A new Firebase app will be created for you with a unique URL ending in You'll use this URL to store and sync data.

Within the App Dashboard you can create, manage and delete Firebase apps. Clicking on a specific Firebase app lets you view and modify your app's data in realtime. In the dashboard, you can also set Security and Firebase Rules, manage your app's authentication, deploys, and view analytics.

CocoaPods Setup

CocoaPods is the easiest way to get started with the Firebase iOS SDK. If you're new to CocoaPods, visit their getting started documentation.

To initialize CocoaPods in your project, run the following commands:

$ cd your-project-directory
$ pod init
$ open -a Xcode Podfile # opens your Podfile in XCode

Once you've initialized CocoaPods, just add the Firebase Pod to your Podfile:

pod 'Firebase', '>= 2.5.1'

Then run the command:

$ pod install
$ open your-project.xcworkspace

Now you're ready to get started in XCode.

Alternative Setup

For instructions on including the Firebase framework and its dependencies manually see the guide on alternative setup here.

Getting started in Xcode


Include the Firebase header in your app to get all the needed classes:

#import <Firebase/Firebase.h>


You can start using Firebase in your Swift class by simply importing Firebase:

import Firebase
  1. 1


    Installation & Setup

  2. 2


    Understanding Data

  3. 3


    Saving Data

  4. 4


    Retrieving Data

  5. 5


    Structuring Data

  6. 6


    Understanding Security

  7. 7


    User Authentication

  8. 8


    Offline Capabilities