PDF download Download Article PDF download Download Article

When you develop an app, being able to track analytics like app installations is incredibly helpful for mobile attribution, improving your app rank, or tracking campaigns. For that reason, companies have created tools that compile a bunch of useful data from your app, with one of the most successful being Google’s Firebase. While setting Firebase up takes some work, the wide variety of services and analytics it provides make it very worthwhile. This wikiHow article will teach you how to set up Firebase for your iOS app and use it to track new users.

Method 1
Method 1 of 4:

Preparing to Use Firebase

PDF download Download Article
  1. On the Apple computer you are using for app development, install Xcode 12.2 or later , then install CocoaPods 1.10.0 by running the command sudo gem install cocoapods in Terminal. [1] [2]
    • Unfortunately, Xcode is only available for macOS. While it is possible to run Xcode using a virtual machine, it will certainly run more slowly than it would on a physical Mac, and VM-specific issues may arise that are difficult to debug.
    • Be sure your app is designed for these operating system versions or later: iOS 10, macOS 10.12, tvOS 12, and watchOS 6.
  2. To test data collection and the functionality of your app as a whole, set up a physical Apple device or use a simulator.
    • If you would like to use Cloud Messaging, a feature that allows you to receive notification and data payloads of up to 4,000 bytes, you have to run the app from a physical Apple device. [3]
    Advertisement
  3. Signing in will take you to the Firebase console, where you will eventually be able to manage a number of settings and view analytics for your app.
  4. Advertisement
Method 2
Method 2 of 4:

Creating a Firebase Project for Your App

PDF download Download Article
  1. After opening the console , create a new project for your app with the white Create a project button.
  2. Once you have typed in a name, click the blue Continue button to continue setting up your project.
  3. Google Analytics is necessary to track your app installs, so be sure to enable it before moving to the next step.
    • In addition to tracking app installs, Google Analytics also provides a number of useful features including crash analytics, cloud messaging, A/B testing, and more.
  4. Use the dropdown menu to select your country, then decide what Analytics data to share with Google by either accepting their default settings or changing it yourself by unchecking the blue checkbox.
  5. Click the blue checkbox to accept the Google Analytics terms, then press the blue Create project button.
  6. After you click the blue Continue button, you will be brought back to the Firebase console. The top of the page will now display the name of your project, and a variety of management options will appear on screen.
    • Firebase has both a free model called the “Spark plan” and a pay-as-you-go model called the “Blaze plan”. Determine which is right for your app by comparing the features each plan offers .
  7. Advertisement
Method 3
Method 3 of 4:

Adding Firebase to Your App

PDF download Download Article
  1. When you open the console , click the white, circular button labelled iOS+ under “Get started by adding Firebase to your app”.
  2. Your app bundle ID will be listed next to “Bundle Identifier” in the General tab of your app.
  3. If you choose to enter a nickname for your app, it will be used to identify your app in your Firebase project. Including an App Store ID will allow Firebase Dynamic Links to send users to your app page on the App Store and Google Analytics to import and measure conversion events in Google Ads.
    • Your App Store ID is the series of numbers after “id” at the end of your app’s URL.
    • If your app does not have an App Store ID yet, you can input one later in your project settings.
  4. After clicking the blue Register app button, the next step will appear. Click the new Download GoogleService-Info.plist button to download the necessary config file.
  5. Move the “GoogleService-Info.plist” file into the root of your Xcode project.
  6. To navigate to your project directory, move through higher level directories by typing cd (directory name) until you reach the folder containing your project’s directory, then type cd (project name) .
  7. Podfiles are used by CocoaPods, a dependency management software used by Firebase.
  8. This will import the Analytics software development kit (SDK), allowing you to track and manipulate data from your app.
  9. You should use the new “.xcworkspace” file for all future development on your app.
  10. The Firebase module should be imported with import Firebase if you are coding in Swift or @import Firebase; if you are using Objective-C.
  11. For Swift users, do so with FirebaseApp.configure() ; for Objective-C users, write [FIRApp configure]; . Typically, these instances will be configured in your application:didFinishLaunchingWithOptions: method.
  12. Once you have run the app, check the Firebase console to ensure you have installed Firebase correctly.
  13. Advertisement
Method 4
Method 4 of 4:

Using Firebase to Track Installations of Your App

PDF download Download Article
  1. Go to the Firebase console , then open the project labeled with your app’s nickname.
  2. Once the Analytics Dashboard is open, you will see a variety of stats about user activity and engagement.
  3. Click the arrow at the top right of the graph to open a dropdown menu that will allow you to make a graph detailing all users, new users, or returning users. The new users graph will show you how many users opened your app for the first time over a certain time period, essentially tracking new installations.
  4. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      Expert Interview

      Thanks for reading our article! If you’d like to learn more about dealing with mobile devices, check out our in-depth interview with Jessica Andzouana .

      About This Article

      Article Summary X

      1. Install Xcode and CocoaPods on your Apple computer, run your app on an Apple device, and sign into Firebase with a Google account.
      2. Create a Firebase project for your app from the Firebase console.
      3. Click the iOS+ button on the Firebase console and register your app.
      4. Download the "GoogleService-Info.plist" config file and add it to the root of your Xcode project.
      5. Create a Podfile through Terminal in the directory of your app project with pod init .
      6. Open your Podfile, write pod ‘Firebase/Analytics’ , save the file, and run pod install in Terminal.
      7. Run open (project name).xcworkspace in Terminal, then import the Firebase module in your AppDelegate class and configure an instance of Firebase App .
      8. Return to the Firebase console, then open the Analytics Dashboard and filter the "Users by App Version" graph to track your app installations.

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 20,999 times.

      Is this article up to date?

      Advertisement