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.
Add the SDK your Xcode project
Extract the SDK archive you downloaded and copy the following files to your Xcode project:
GoogleSignIn.bundle
GoogleSignIn.framework
GoogleSignInDependencies.framework
Add
GoogleSignIn.bundle
to your Xcode project's Copy Bundle Resources build phase.
Link dependent frameworks to your Xcode project
Link the following frameworks to your Xcode project:
LocalAuthentication.framework
SafariServices.framework
AuthenticationServices.framework
SystemConfiguration.framework
Add the ObjC
linker flag
to the app target's build settings:
- Other Linker Flags:
$(OTHER_LDFLAGS) -ObjC
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.
Get an existing OAuth client ID
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:
com.googleusercontent.apps.1234567890-abcdefg
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 follow the guide to add Google Sign-In to your iOS app.