Register App for Google SignIn services for iOS platform

Part ɪɪ: React-Native UI│Story 02: Register App for Google SignIn services for iOS platform

We want to allow our app users to log into our app using their Google accounts.

In order to implement Google Sign-in in our app for various platforms like iOS and Android, we have to register our app in Google developer’s account. Below are the tasks that we need to perform to register for Google Sign-in for iOS platform.

  • Create a Firebase project for our app.
  • Add an iOS app to the Firebase project

Later in the series, we would also add Android app to our Firebase project for Google Sign-in to work on Android Platform.

Creating a Firebase project for our app

1 . Log into your Google’s developer account. (or create a Google’s developer account if you don’t have one).

2 . Go to Firebase console https://console.firebase.google.com/u/0/

3 . Click on Add Project button 👇

4 . In the Add Project details pop-up:
- Enter project name: 𝚗𝚘𝚝𝚎𝚆𝚘𝚛𝚍𝚢 (as per our resource name specifications)
- Select the I Accept terms check box
- Click Create project button 👇

6 . Project will be created, a popup message would be shown once the project is ready, click Continue 👇

You would land on the project’s Firebase Overview/Console page 👇.

Next, we would add an iOS App to this Firebase project.

ADDING iOS APP

Click on iOS icon button on the Firebase project’s overview page 👇

In the next screen, enter iOS bundle is and optionally a nick name for the app.
Click on Register App button 👇

Once the app gets registered, a GoogleService-Info.plist file would be created that you can download.

Download the file and save it to a folder where you would remember to add it later to our React-Native iOS project.

You can stop here at step # 2 of adding the iOS app, no need to follow next steps mentioned on the Firebase Add project page.

Setting up OAuth 2.0

We added an iOS App to our Firebase Project. Next we have to register this iOS App for OAuth 2.0 so that it can be used for Google SignIn services:

  1. Go to the Google Cloud Platform Console.
  2. From the projects list, select the project we created in Firebase console i.e. noteWordy.
  3. From the left side panel menu, select API & Services and select Credentials from the sub-menu.

Similarly, secure the other keys you may have in the Credentials screen:

Now click on ‘OAuth consent screen’ tab, change the value in Application Name and add a logo image for the app. Its optional and temporarily you can add any image before the app is finally ready to be published 👇

That completes registering our app for Google Sign-in services for iOS.

In the next part, we would start with our react-native project.

Prev: Install RN Dependencies 🏠Next:Initialize RN project

--

--