If you don't have an Xcode project already, you can download one of our
quickstart samples if you just want to try a Firebase
feature. If you're using a quickstart, remember to get the bundle identifier
from the project settings, you'll need it for the next step.

Add Firebase to your app

It's time to add Firebase to your app. To do this you'll need a Firebase
project and a Firebase configuration file for your app. Visit
Understand Firebase Projects to learn more about
Firebase projects.

Create a Firebase project

In the Firebase console, click Add project, then
select or enter a Project name.

If you have an existing Google Cloud Platform (GCP) project, you can
select the project from the Project name dropdown menu.
Otherwise, enter a new Project name.

If you are planning to download and run one of the
quickstart samples, the Xcode project and Podfile are
already present, but you'll still need to install the pods and download
the GoogleService-Info.plist file. If you would like to integrate the Firebase
libraries into one of your own projects, you will need to add the pods
for the libraries that you want to use.

If you don't have an Xcode project yet, create one now.

Create a Podfile if you don't have one:

$ cd your-project directory
$ pod init

Add the pods that you want to install. You can include a Pod in your
Podfile like this:

pod 'Firebase/Core'

This will add the prerequisite libraries needed to get Firebase up and running
in your iOS app, along with Google Analytics for Firebase. A list of currently
available pods and subspecs is provided below. These are
linked in feature specific setup guides as well.

Install the pods and open the .xcworkspace file to see the project in Xcode.

$ pod install
$ open your-project.xcworkspace

Download a GoogleService-Info.plist file from Firebase console
and include it in your app.

Note: If you have multiple bundle IDs in your project, each bundle ID must be
connected in Firebase console so it can have its own
GoogleService-Info.plist file.

Initialize Firebase in your app

The final step is to add initialization code to your application. You may have
already done this as part of adding Firebase to your app. If you are using a
quickstart this has been done for you.