This project is an implementation of iOS client that works with Griddler mobile game backend sample.
Copyright 2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This sample application is not an official Google product. The purpose of this sample is to demonstrate how to power a mobile game with a game backend running on Google App Engine. The sample is not intended to represent best practices in iOS application development.
This sample source code and project is designed to work with Xcode. It was tested with Xcode 5.0.
This section provides a step-by-step guide so you can get the sample up and running in Xcode.
-
Download and install Xcode 4.6 on your Mac computer if you don't have it installed.
-
Setup Griddler mobile game backend.
- Open a new Finder window and navigate to the directory you extract the sample client code. Double click on the Griddler.xcworkspace file. It will open the project in Xcode automatically.
- The iOS client application bundle ID has to match the one you used for creating the SSL certificate and the Provisioning Profile. Out-of-the-box bundle ID is
com.google.cloud.solutions.griddler.ios
. Please rename the bundle ID accordingly via project TARGETS in Xcode.
- Fill in the kAuthClientID and kAuthClientSecret values in Constants.m. The ClientID has to match with the Client ID you used in the backend as described in step 5 of the Prerequisite. The kAuthClientSecret is the matching client secret for the Client ID from API Console.
- Replace yourappid in the kGriddlerServiceUrl variable in Constants.m with the App Engine Application id where the Griddler mobile game backend is deployed.
- Click on the project in the File Browser panel
- Click on the project in the Settings browser
- Click on the Build Settings tab
- Browse down to Code Signing Identity
- Select a valid code signing certificate (APNS enabled provisioning profile)
- On the top left corner of the toolbar, select
[Your bundle ID] > iOS Device
. Then click theRun
button to execute the application. - The application should open up in your iPhone.