Giter Club home page Giter Club logo

getting-started-ios-sdk's Introduction

This is the starter kit for iOS SDK with Swift.

This kit contains a simple iOS application that displays car information using Smartcar's iOS SDK and Swift.

Instructions

Before we get started, create an application on Smartcar's Developer Dashboard to get your API keys.

Note: On the dashboard, you will want to set your redirect_uri as 'sc' + clientId + '://exchange'.

Then, we can set these constants in Constants.swift -

struct Constants {
    static let clientId = "<your-client-id>";
}

Next, we need to setup the custom URL scheme in the Info.plist -

Info.plist

Before setting up the client code, make sure to set up the server code. You can use any of our following back-end SDKs -

Follow the setup instructions in the back-end README except for the redirect_uri. Make sure the redirect_uri environment variable in the back-end directory is the same as the one we have set above.

Now that the server is ready, you can set up the client (the React application).

Set the server uri in Constants.swift. This should be from your back-end directory and is set to http://localhost:8000 by default.

static let appServer = "<app-server>"

Make sure you have cloned this repo -

$ git clone [email protected]:smartcar/getting-started-ios-sdk.git
$ cd getting-started-ios-sdk/app

To install the required dependencies -

$ pod install

Launch the getting-started-ios-sdk.cxworkspace and run the iOS simulator within XCode! In our current set up, we are using Smartcar's test mode, so you can log in with any username and password and you will see information of a simulated vehicle.

getting-started-ios-sdk's People

Contributors

sankethkatta avatar zespinosa97 avatar gurpreetatwal avatar morgannewman avatar

Stargazers

Cong Le avatar Michael Slaughter avatar Justin Bryce avatar

Watchers

Sahas Katta avatar Nick Williams avatar James Cloos avatar Adrian Garcia Jimenez avatar Greg avatar  avatar  avatar  avatar Jeremy Zhang avatar Ashwin Kumar Subramanian avatar  avatar Robert Simari avatar Bharath Gunasekaran avatar Kathleen Hsu avatar Rishab Luthra avatar Neel Kamidi avatar Tae Lee avatar Naomi avatar Dennis Chung avatar Sakshi Garg 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.