Join Joe Marini for an in-depth discussion in this video Set up the development environment, part of Google Firebase for iOS: First Look.
- In order to complete this course and the associated exercises, you will need to set up your development environment. First, you will need the latest version of Xcode. In this course, I will be using Xcode 7, but it's okay if you're using a later version. If you don't have Xcode installed, you can download it from https://developer.apple.com/download. And note that if you're not already a registered Apple developer, you'll have to register. So, go ahead and download and run the installer, and then go to the next step.
To be able to use the Firebase Console, you will need to have a Google account. If you already have one, then you can just log in and proceed to the next step. If you need to create one, go to https://accounts.google.com and click on Create Account, and follow the process to create one. Then, make sure that you are logged into that account. Once you are logged in, go to https://console.firebase.google.com. This will take you to the developers console. It's here that you will set up the project and APIs for some of the exercises in this course.
For now, you can leave this as you see it, and we'll come back to it as we need to. Next, we'lL set up the Firebase STK. To install the Firebase STK, I'm going to be using the CocoaPods tool. If you don't already have CocoaPods installed, you can get it by going to https://cocoapods.org, and then following these installation instructions. And note that depending on the version of your Mac OS, you might have to update your installation of Ruby, but that's a simple process. Okay, once you've got CocoaPods installed, let's open the Mac Terminal app.
To make sure that CocoaPods is correctly installed, type pod --version. This should show you a version number. If you get an error message, that means that CocoaPods is not correctly installed and you should do it again. If you want to see all the commands that CocoaPods supports, type pod --help and that will list all the commands. Next, we're going to go into the exercise files folder on the computer, wherever you've placed it. Now, for me, that's on my desktop. So, I'm going to type cd ~/Desktop/ExerciseFiles/Start and I'm going to go into the Start folder for my starting point code.
Next, I'm going to create my pod file by typing pod init. That's going to create an empty pod file and if we look at the Start folder, you'll see that it's right here. So, let's open that with our text editor. Now, we're going to be working with Firebase analytics, remote config and authentication in this title, so we need to add those pods. So, let's add those lines to the file. I'll type pod Firebase/Core and that will get me the analytics package.
Then, I'll type pod Firebase/Auth and pod Firebase/RemoteConfig. Alright, so let's save that and let's go back to the Terminal. Now, to install the pods, I'm going to type pod install. This will download and install the Firebase libraries that we're going to be using. And if you look back at the folder, you'll notice that there's now a Podfile.lock, here's the Pods folder, and a new file's been created called xcworkspace.
That's the project file that we'll be using when we open up Xcode. Don't use the Xcode proj file, use the workspace file. So once you've completed this step, your development environment should be ready to go.
- What is Firebase?
- Creating a Firebase project
- Adding the Analytics API
- Implementing Firebase Remote Config
- Authenticating users with Firebase Authentication