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.
Adding Google+ client features to iOS applications requires:
- Install Xcode 4.5 or later
Step 1: Enable the Google+ APITo 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.
- Go to the Google Developers Console.
- Select a project, or create a new one.
- In the sidebar on the left, select APIs & auth (the APIs sub-element is automatically selected).
- 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.
In the sidebar under "APIs & auth", select Consent screen.
- Choose an Email Address and specify a Product Name.
- In the sidebar on the left, select Credentials.
In the OAuth section of the page, select Create New Client ID.
In the resulting Create Client ID dialog box, 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.
The default Bundle ID for the provided sample app is
- 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.
- 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.
- Download the Google+ iOS SDK which includes the quick-start application.
- Navigate to the zip file in the Finder and double-click it to extract it to
a folder named
- Inside this folder, open the
SampleCodefolder then double-click the
GooglePlusSampleXcode project file to open it in Xcode.
Step 3: Insert the client ID
- In Xcode, navigate to the
GooglePlusSamplefolder and open the file
- In this file, find the variable
kClientIDand replace its value within quotes to the client ID you generated earlier.
Step 4: Run the Google+ sample application
- 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.
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: