Skip to content
A simple client for a Tic Tac Toe game using Google Cloud Endpoints and iOS.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This application implements a simple client for a Tic Tac Toe game using Google Cloud Endpoints, App Engine, Objective-C, and iOS.

It relies on a copy of the Google APIs Client Library for Objective-C.

This example also uses ARC. If your application uses ARC, you must set the -fno-objc-arc for the files included in the client library. To do this, in Project Navigator -> Target -> Build Phases -> Compile Sources, set the -fno-objc-arc compiler flag for each of the client library sources.

NOTE: This sample was written with a Java backend in mind. As a result, the generated code will differ slightly than that for the Python Tic Tac Toe sample. For the most part this will be immaterial to the sample, but there are a few key differences:

  • The generated schema names in the discovery document are different in Python than in Java, even though the hold the same data. This will cause the generated classes corresponding to the schema to have different names.
  • Python supports enums and uses 'WHEN' and 'TEXT' for the order field in queries, while Java simply uses "1" and "2", respectively.
  • The Python backend stores the current user for authenticated requests, but does not return the user in the score insert response or score list response.




Setup Instructions

  1. Open TicTacToeSample.xcodeproj in Xcode.
  2. Modify kMyClientId and kMyClientSecret in ViewController.m to include the web client ID and client secret you registered in the APIs Console.
  3. Modify GTLServiceTictactoe.m (line 44) to point to the location where you are hosting a Tic Tac Toe backend (based off of the Java backend example).
  4. Run the application.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.