Skip to content

iOS mobile application demonstrating use of IoT for Automotive for car sharing

License

Notifications You must be signed in to change notification settings

theiliad/iota-starter-carsharing

Repository files navigation

IoT for Automotive Starter Mobile Application


Overview

This IoT for Automotive Starter will help you get started with the IoT for Automotive Context Mapping and Driver Behavior services available on IBM Bluemix in order to create automotive solutions.

The IoT for Automotive Starter Mobile App is a sample source code for interacting with the IBM IoT for Automotive Starter Server Application, which enables a car-sharing service. Using the mobile app, you can search available cars near you, reserve a car, unlock and then start driving. You can also view your driving score as a part of the service.

This sample source code for IoT for Automotive Starter Mobile App is intended solely for use with an Apple iOS product and intended to be used in conjunction with officially licensed Apple development tools and further customized and distributed under the terms and conditions of your licensed Apple iOS Developer Program or your licensed Apple iOS Enterprise Program.

The sample source code for the companion IoT for Automotive Starter Server App can be found at ibm-watson-iot/iota-starter-server.


How to build and run this app

This application source code was developed using Xcode 7.3. To run this app, follow the stepps below.

  1. Install CocoaPods if needed (See CocoaPods for more information)

    $ sudo gem install cocoapods

  2. Clone this repo into your local environment

    $ git clone https://github.com/ibm-watson-iot/iota-starter-carsharing

  3. Go to the project folder on the Terminal app

  4. $ pod install

  5. $ open MobileStarterApp.xcworkspace

  6. Click the run button at the top left of the Xcode UI.

Note: Please make sure that you are running Xcode 7.3+

(Optional) Setup Push Notifications

You can enable push notifications to the mobile app when the weather at the drop off time of your car reservation becomes bad. Follow the steps below to make the Push Notifications ready for use. See Push Notifications for more information.

  1. Register an App ID enabled Push Notifications on Apple Developer portal

  2. Create a development APNs SSL certificate

  3. Create a development provisioning profile

  4. Setting up APNs on the Bluxmix Push Notifications Dashboard binded to your server application

  5. Connect your iOS phone to your Mac

  6. Change Bundle Identifier of the Xcode project to your App ID

  7. Build and run the mobile app targeting to your iOS phone

  8. Tap "Specify Server" button on the mobile app

  9. Tap QR code image, then camera function will be launched

  10. Open your server app (https://<your-app-route>.mybluemix.net/) by PC browser and scroll down to show a QR code

  11. Read the QR code by the mobile app


This mobile app contains simple demonstration of Mobile Client Access service. It logins with hardcoded username and password using Mobile Client Access for custom authentication.

  • CustomAuthDelegate.swift onAuthenticationChallengeReceived()
    Call submitAuthenticationChallengeAnswer() with hardcorded username and password.

  • QRCodeReaderViewController.swift configureVideoCapture()
    Set whether use custom authentication or not in okAction.

  • API.swift doInitialize()
    Initialize the Mobile Client Access client SDK.

See Configuring the Mobile Client Access client SDK for iOS for more information.

Also need to add and configure Mobile Client Access for custom authentication on IoT for Automotive Starter app server. See IoT for Automotive Starter app.


Report Bugs

If you find a bug, please report it using the Issues section.


Useful links

IBM IoT for Automotive IBM Watson Internet of Things
IBM Watson IoT Platform
IBM Watson IoT Platform Developers Community IBM Bluemix
IBM Bluemix Documentation
IBM Bluemix Developers Community

About

iOS mobile application demonstrating use of IoT for Automotive for car sharing

Resources

License

Stars

Watchers

Forks

Packages

No packages published