Click here to see your recently viewed pages and most viewed pages.
Hide
Google+ Platform

Quick-start sample app 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 a Google Developers Console project, enable the Google+ API then create a client ID.
  1. Go to the Google Developers Console.
  2. Select a project, or create a new one.
  3. In the sidebar on the left, select APIs & auth (the APIs sub-element is automatically selected).
  4. In the displayed list of APIs, make sure the Google+ API status is set to ON, as well as any other APIs that your app requires.
  5. In the sidebar under "APIs & auth", select Consent screen.
    1. Choose an Email Address and specify a Product Name.
  6. In the sidebar on the left, select Credentials.
  7. In the OAuth section of the page, select Create New Client ID.

    In the resulting Create Client ID dialog box, do the following:

    1. Select Installed application for the Application type.
    2. Select iOS.
    3. In the Bundle ID field, enter the bundle identifier from your application's project summary. The default Bundle ID for the provided sample app is com.google.GooglePlusPlatformSample.
    4. Leave the App Store ID field blank, since this quick-start app is not published in the Apple iTunes App Store.
    5. Under Deep Linking, click Enabled.
    6. Click the Create client ID button.

      Shows options in the Create Client ID dialog box.

  8. In the resulting Client ID for iOS application panel, note or copy the Client ID that your app will need 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 a Google Developers Console project, configure your Xcode project, and run the sample app, use the following to start integrating Google+ features into your own app:

Otherwise, you can learn more about a Google+ feature and integrate it into your app: