Start integrating Google Sign-In into your iOS app

Before you can begin integrating your iOS app with the Google Sign-In components, you must download the dependencies and configure your Xcode project. The steps on this page do just that. The next steps then describe how to integrate Google Sign-In features into your app.

Before you begin

Set up your CocoaPods dependencies

Google Sign-In uses CocoaPods to install and manage dependencies. Open a terminal window and navigate to the location of the Xcode project for your application. If you have not already created a Podfile for your application, create one now:

pod init

Open the Podfile created for your application and add the following:

pod 'GoogleSignIn'

Save the file and run:

pod install

This creates an .xcworkspace file for your application. Use this file for all future development on your application.

Get a configuration file

Click the button below to get a configuration file to add to your project.

The configuration file provides service-specific information for your app. To get it, you must select an existing project for your app or create a new one. You'll also need to provide a bundle ID for your app.

Get a Configuration File

Add the configuration file to your project

Drag the GoogleService-Info.plist file you just downloaded into the root of your Xcode project and add it to all targets.

Add a URL scheme to your project

Google Sign-in requires a custom URL Scheme to be added to your project. To add the custom scheme:

  1. Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section.
  2. Click the + button, and add a URL scheme for your reversed client ID. To find this value, open the GoogleService-Info.plist configuration file, and look for the REVERSED_CLIENT_ID key. Copy the value of that key, and paste it into the URL Schemes box on the configuration page. Leave the other fields blank.

When completed, your config should look something similar to the following (but with your application-specific values):

Next steps

Now that you've downloaded the project dependencies and configured your Xcode project, you can add Google Sign-In to your iOS app.