Google+ Platform

Quick start for iOS

This quick-start application is an iOS Xcode project that lets you get started with the Google+ platform in about 10 minutes. The app demonstrates using the Google+ Sign-In button, using SDK methods to list people that the user has circled, and making requests to other Google APIs.


Prerequisites

Adding Google+ client features to iOS applications requires:

Step 1: Enable the Google+ API

To enable the Google+ API for your app, you need to create an APIs Console project, enable the Google+ API then create and get a client ID.
  1. In the Google APIs Console , select Create from the pull-down menu on the left, enter a project name (such as "iOS Quickstart App"), and click the Create project button.
  2. In the Services pane, enable the Google+ API and any other APIs that your app requires by turning them on.
  3. In the API Access pane, click Create an OAuth 2.0 Client ID.
    1. In the Product name field, enter a name for your application (such as "Sample"), and click Next. Providing a product logo is optional.
    2. In the Create Client ID dialog box, shown below, do the following:
      • Select Installed application for the Application type.
      • Select iOS.
      • In the Bundle ID field, enter the bundle identifier from your application's project summary. If you are using the provided sample app, use com.google.GooglePlusPlatformSample or if you changed the value in your build, specify your bundle ID.
      • Leave the App Store ID field blank, since this quick-start app is not published in the Apple iTunes App Store.
      • Under Deep Linking, click Enabled.
      • Click the Create client ID button.
      • Shows options in the Create Client ID dialog box.

  4. In the API Access pane, locate the section Client ID for installed applications and note or copy the Client ID that you will need later to run the sample.

Step 2: Download the quick-start app and open its Xcode project

The zip file to download contains the source files and Xcode project file for the quick-start application. The file also contains the iOS SDK library for the Google+ platform.

  1. Download the Google+ iOS SDK which includes the quick-start application.
  2. Navigate to the zip file in the Finder and double-click it to extract it to a folder named google-plus-ios-sdk-version.
  3. Inside this folder, open the SampleCode folder then double-click the GooglePlusSample Xcode project file to open it in Xcode.

Step 3: Insert the client ID

  1. In Xcode, navigate to the GooglePlusSample folder and open the file GooglePlusSampleAppDelegate.m .
  2. In this file, find the variable kClientID and replace its value within quotes to the client ID you generated earlier.

Step 4: Run the Google+ sample application

  1. In Xcode, click the Run button to compile and run the app.

This sample app demonstrates Google+ feature and shows how to integrate the Google+ components in your app.

Next steps

Now that you have learned to create an APIs console project and configured your Xcode project, you can begin integrating Google+ features into your iOS app:

Learn more about the Google+ features you can add to your app:

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.