Code Monkey home page Code Monkey logo

solutions-mobile-shopping-assistant-ios-client's Introduction

status: inactive

This project is no longer actively developed or maintained.

For new work on this check out MobileShoppingAssistant

Mobile Shopping Assistant iOS Client

Copyright

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.

Disclaimer

This sample application is not an official Google product.

Support Platform and Versions

This sample source code and project is designed to work with Xcode 4.6. The application is tested on iOS 6.1.

Overview

Mobile Shopping Assistant iOS Client demonstrates how to build an iOS client that mirrors the functionality of the Android client by leveraging the same Mobile Shopping Assistant Java Backend with the help of Google APIs Client Library for Objective-C.

Download

After downloading this iOS client sample, unzip the package to extract the files in a directory of your choice. Note that this client sample has dependency on the Mobile Shopping Assistant Java Backend, the following section will provide instruction on how to set up the backend.

Developer Guide

This section provides a step-by-step guide so you can get the sample up and running in Xcode.

Prerequisites

  1. Download and install Xcode 4.6 on your Mac computer if you don't have it installed.

  2. Download Mobile Shopping Assistant Java Backend. Follow the README.md and deploy the backend to Google App Engine. Note that the Bundle ID for this iOS client is com.google.sample.MobileAssistantIOS.

  3. Follow steps in README.md in MobileAssistant-Data directory to import sample data to the deployed backend if you have not already done so.

Set up Mobile Assistant iOS Client Xcode Project

Open MobileAssistantIOS project in Xcode

  1. Open a new Finder window and navigate to the directory you have extracted the Mobile Assistant iOS Client. Double click on the MobileAssistantIOS.xcodeproj file. It will open the project in Xcode automatically.

Configure Mobile Assistant Backend to Recognize the iOS Client App

  1. The Mobile Assistant Backend was configured to use a particular IOS_CLIENT_ID in step 2 of the Prerequisites.

  2. Look up the client secret, that corresponds to the IOS_CLIENT_ID in the backend, from Google API Console, update the following constants in the ShopsTableViewController.m file in the MobileAssistantIOS project:

  • kKeyClientID (in line 36)
  • kKeyClientSecret (in line 37)
  1. In the MobileAssistantIOS/API/GTLServiceShoppingassistant.m file, replace the string "{{{YOUR APP ID}}}" with the Application ID where the Mobile Assistant Backend was deployed.

Build and Execute the MobileAssistantIOS Project

  1. On the top left corner of the toolbar in Xcode, select MobileAssistantIos > iPhone 6.1 Simulator. Click the Run button to execute the app.

  2. Switch to the iOS Simulator application from Xcode. You can now interact with the MobileAssistantIOS Client App.

  • Since this application is location-sensitive, to work with existing data in the Mobile Assistant Backend, set the location to {Latitude: 37.785834, Longtitude: -122.406417} via the menu Debug > Location > Custom Location…
  • If prompted, click "OK" to allow MobileAssitantIOS app to access your current location.
  • The application may ask for your Google Account information. Sign in and consent to allow the application to view your email address and know who you are on Google.
  • On the first screen, click any store location. On the next screen, the application will display different recommendations and offers based on different store location.

Take a Closer Look at MobileAssistantIOS Client App

In ShopsTableViewController.m file, set breakpoints to the following methods:

  • getAllShops
  • getAllOffers
  • getAllRecommendations

These methods are responsible for making the requests to the Mobile Assistant Backend via the Google APIs Client Library for Objective-C.

Optional Reference

  1. Click here to learn more about generating iOS client library for Google Cloud Endpoint.

solutions-mobile-shopping-assistant-ios-client's People

Contributors

lesv avatar ravimadasu2007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.