The recommended way to include the Google Sign-In SDK in your iOS project is to use CocoaPods, but you can also download the SDK and manually configure your project to use it.
Download the Google Sign-In SDK
Version 5.0.0 of the Google Sign-in SDK for iOS introduced some API changes incompatible with prior versions. See the quick migration guide for upgrade instructions.
- Google Sign-In SDK 5.0.0
- Google Sign-In SDK 4.4.0
- Google Sign-In SDK 4.3.0
- Google Sign-In SDK 4.2.0
- Google Sign-In SDK 4.1.2
- Google Sign-In SDK 4.1.1
- Google Sign-In SDK 4.1.0
- Google Sign-In SDK 4.0.1
- Google Sign-In SDK 4.0.0
- Google Sign-In SDK 3.0.0
- Google Sign-In SDK 2.4.0 (deprecated)
- Google Sign-In SDK 2.3.2 (deprecated)
- Google Sign-In SDK 2.3.0 (deprecated)
- Google Sign-In SDK 2.2.0 (deprecated)
- Google Sign-In SDK 2.1.0 (deprecated)
- Google Sign-In SDK 2.0.1 (deprecated)
- Google Sign-In SDK 1.0.0 (deprecated)
Add the SDK your Xcode project
Extract the SDK archive you downloaded and copy the following files to your Xcode project:
GoogleSignIn.bundleto your Xcode project's Copy Bundle Resources build phase.
Link dependent frameworks to your Xcode project
Link the following frameworks to your Xcode project:
ObjC linker flag
to the app target's build settings:
- Other Linker Flags:
Get an OAuth client ID
If you haven't already created an OAuth client ID, click the button below to do so.
After you create the OAuth client ID, take note of the client ID string, which you will need to configure Google Sign-in in your app. You can optionally download the configuration file, which contains your client ID and other configuration data, for future reference.
If you already created an OAuth client ID, you can find your existing OAuth information by clicking the button below.
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:
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.
Click the + button, and add your reversed client ID as a URL scheme.
The reversed client ID is your client ID with the order of the dot-delimited fields reversed. For example:
When completed, your config should look something similar to the following (but with your application-specific values):
Now that you've downloaded the project dependencies and configured your Xcode project, you can follow the guide to add Google Sign-In to your iOS app.