|
1 |
| -TODO(butterfield): This is a placeholder to satisfy the Cocoapods library podspec. |
| 1 | +# Google Sign-In C++ SDK |
| 2 | +_Copyright (c) 2018 Google Inc. All rights reserved._ |
2 | 3 |
|
3 |
| -To validate the podspec run: |
4 | 4 |
|
5 |
| -pod lib lint GoogleSignInCpp.podspec |
| 5 | +## Overview |
6 | 6 |
|
7 |
| -To build the testapp: |
| 7 | +This is the Google Sign-In C++ API, for Android and iOS. The intent is to unify |
| 8 | +the iOS (Objective-C) and Android (Java) native interfaces into a single common |
| 9 | +C++ interface that abstracts all of the platform specific details, however |
| 10 | +currently only the Android implementation is supported. |
8 | 11 |
|
9 |
| -cd testapp |
10 |
| -pod install |
11 |
| -open testapp.xcworkspace |
| 12 | +This is intended for projects that require OAuth ID tokens for server auth |
| 13 | +codes. |
| 14 | + |
| 15 | +### Getting Started |
| 16 | + |
| 17 | +See |
| 18 | +[Google Sign-In for Android](https://developers.google.com/identity/sign-in/android/start) |
| 19 | +for information on getting started. |
| 20 | + |
| 21 | +### Dependencies |
| 22 | + |
| 23 | +On Android you'll need to add the dependency |
| 24 | +`com.google.android.gms:play-services-auth`, based on the |
| 25 | +[setup guide](https://developers.google.com/identity/sign-in/android/start-integrating). |
| 26 | + |
| 27 | + |
| 28 | +## Configuring the application on the API Console |
| 29 | + |
| 30 | +To authenticate you need to create credentials on the |
| 31 | +API console for your application. The steps to do this are available on |
| 32 | +[Google Sign-In for Android](https://developers.google.com/identity/sign-in/android/start). |
| 33 | +In order to access ID tokens or server auth codes, you also need to configure a |
| 34 | +*web* client ID. From the |
| 35 | +[Credentials Page on the API Console](https://console.developers.google.com/apis/credentials) |
| 36 | +select the "Create credentials" dropdown, and choose OAuth Client ID. On the |
| 37 | +next page choose Web Application, name the client whatever you like, and then |
| 38 | +click "Create". |
12 | 39 |
|
13 |
| -(build and run) |
| 40 | + |
| 41 | +## How to build the sample |
| 42 | + |
| 43 | +First be sure to edit the sample source configuration: |
| 44 | + |
| 45 | +In testapp/src/common_main.cpp, replace "YOUR_WEB_CLIENT_ID_HERE" with your web |
| 46 | +client id, from the configuration step above. |
| 47 | + |
| 48 | +### Building for Android |
| 49 | + |
| 50 | +The android build is setup using gradle. |
| 51 | + |
| 52 | +Navigate to the testapp directory, and build using the "build" target: |
| 53 | + |
| 54 | +cd testapp |
| 55 | +./gradlew build |
0 commit comments