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 an APIs Console project, enable the Google+ API then create and get a client ID.
- 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.
- In the Services pane, enable the Google+ API and any other APIs that your app requires by turning them on.
- In the API Access pane, click
Create an OAuth 2.0 Client ID.
- In the Product name field, enter a name for your application (such as "Sample"), and click Next. Providing a product logo is optional.
- 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.GooglePlusPlatformSampleor 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.
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 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: