Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rockwotj/google-cloud-endpoints-client
Cocoa Pod for the Google Cloud Endpoints Client Library
https://github.com/rockwotj/google-cloud-endpoints-client
Last synced: 8 days ago
JSON representation
Cocoa Pod for the Google Cloud Endpoints Client Library
- Host: GitHub
- URL: https://github.com/rockwotj/google-cloud-endpoints-client
- Owner: rockwotj
- License: mit
- Created: 2015-06-12T02:22:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-04T23:47:41.000Z (about 9 years ago)
- Last Synced: 2023-02-26T11:26:09.122Z (over 1 year ago)
- Language: Objective-C
- Size: 352 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Google Cloud Endpoints Client Cocoa Pod
This is a CocoaPod of the [GTL Client library](https://code.google.com/p/google-api-objectivec-client/) that is used in Google Cloud Endpoint's generated client code. This is basically a way to automate [this](https://cloud.google.com/appengine/docs/python/endpoints/consume_ios#Python_Adding_required_files_to_your_iOS_project) step in the Google Cloud Endpoints setup process. This pod is automatically updated once a week, via a [script](https://gist.github.com/rockwotj/77dcb7fc64c64cd21f4c).
I hope this makes your life a little easier!
## Installation
google-cloud-endpoints-client is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'google-cloud-endpoints-client', :git => 'https://github.com/rockwotj/google-cloud-endpoints-client.git'
```## How to set up Google Cloud Endpoints with this pod
These steps are repeated from the iOS course [here](http://www.rosebotics.org/courses), which are generalized versions of [Google's steps](https://developers.google.com/appengine/docs/python/endpoints/consume_ios).
### Step 1 - Add two frameworks
The first step is easy. Add two frameworks to the project:1. Security.framework
1. SystemConfiguration.framework### Step 2 - Add the Cocoa Pod
Add this to your pods file
```ruby
pod 'google-cloud-endpoints-client', :git => 'https://github.com/rockwotj/google-cloud-endpoints-client.git'
```
then
```shell
pod install
```### Step 3 - Generate the files for your backend
This is a two step process1. Create a file that is called the discovery document
1. Feed that discovery document to an executable called ServiceGenerator (note, you’ll need to compile that binary from the source code before you can use it!)Creating the discovery document
In the root directory of your appengine project (where app.yaml is located) run the following command (assuming your api is all in one class)
```shell
endpointscfg.py get_discovery_doc -f rpc .
```This should output a file called: \.discovery
Using and compiling the ServiceGenerator
Check out [GTL Client library](https://code.google.com/p/google-api-objectivec-client/) using
```shell
svn checkout https://code.google.com/p/google-api-objectivec-client/
```
Then open the ServiceGenerator.xcodeproj in X-Code (it’s in this folder… Source → Tools → ServiceGenerator → ServiceGenerator.xcodeproj) and then hit Project->Build or ⌘BAfter it is built, using the full path of the executable run this command within the root directory of you appengine project
```shell
/your/full/path/to/ServiceGenerator ./.discovery --outputDir ./API
```
Your entire API was created and placed into the ./API folder. Copy all of the files EXCEPT THE FILE \_Sources.m into X-Code.After that, if you use Swift, like I do, add this import to your Bridging Header
```objc
#import "GTL.h"
```Then you're all ready to roll! It is still a lot of work, but at least the pod speeds up one of those steps.
## Author
Tyler Rockwood (rockwotj)
## License
Google Cloud Endpoints Client is available under the MIT license. See the LICENSE file for more info.