Join Joe Marini for an in-depth discussion in this video Create the Firebase project, part of Google Firebase for iOS: First Look.
- [Instructor] We need to set up our project on the Firebase console before we can start using it on the client-side devices. So in your browser, make sure you are logged in to your Google account, and go to the Firebase console at https://console.firebase.google.com. If you haven't yet created any Firebase projects, you'll be presented with an empty page that looks something like this. To create a new project, click on the Create New Project button. Give your project a name, doesn't really matter what it is. I'm just going to call mine FirebaseStuff, and click on Create.
When you've created the app, you'll be taken to the Firebase console homepage. If you scroll down, you'll see a list of the various Firebase products with links to their associated documentation. For now, we're going to click on the iOS button to add Firebase to our client app. You'll need to supply some information here. Enter the iOS bundle name of the app. I'm using com.joemarini.firebasefirstlook, but you can use whatever you want as your bundle name.
If you have an Apple Developer ID number, you can enter it here as well. It's optional, and we won't be uploading our app to the App Store in this course, so I'm just going to leave it blank. When you click on Add App, the Firebase console will prompt you to download a file named GoogleService-info.plist, and you can see here that it's already been downloaded for me by the browser. You want to save this file into the root directory of where the project is at the same level as the source code.
You'll need to do this for both the start and finished versions of the exercise files, so that the app will use your Google account information. This file is used by Firebase to set up some important information that the client needs to communicate with the Google servers. Once you've saved the file, click Continue. The console then displays the commands needed to install the CocoaPods for working with Firebase. Now, we've already done this part, so we can just skip it. The last screen then shows some simple code to initialize the Firebase library.
We'll see more of that later. So go ahead and click Finish, and then in the folder for the project, you can see that I've copied the GoogleService-info.plist file to my source code here. You can open the project in Xcode by double-clicking or right-clicking on the xcworkspace file and choosing Open. This will bring up Xcode and will give Xcode a chance to compile all the files and get the project ready. Once that step is complete, you're ready to start adding Firebase features into the app.
- What is Firebase?
- Creating a Firebase project
- Adding the Analytics API
- Implementing Firebase Remote Config
- Authenticating users with Firebase Authentication