IBM IoT Connected Vehicle Insights - Mobility Starter Application mobile app for iOS
The IBM IoT Connected Vehicle Insights - Mobility Starter Application uses the Context Mapping and Driver Behavior services that are available on IBM Cloud to help you to quickly build a smart car-sharing automotive solution. The IBM IoT Connected Vehicle Insights - Mobility Starter Application consists of a mobile app and a server component.
The starter app provides a mobile app for customers to quickly find and hire a car without human intervention from a car-hire company. If you are a car-hire customer, you can use the mobile app to do the following tasks:
- Search for available cars by location on a GIS map
- Search for available cars that meet your specific requirements
- Reserve a car
- Unlock the car that you just hired and start driving the car
While you drive the car, the service tracks your location and also records your driving behavior. When you reach your driving destination, you can view information about each trip that you took in the car and you can also view your driving behavior score.
The IBM IoT Connected Vehicle Insights - Mobility Starter Application mobile app interacts with the server component. The server component provides the back-end car sharing and system monitoring service that provides more features for car-hire companies. By default, the mobile app connects to a test server that is provided by IBM. You can also choose to deploy your own server instance to IBM Cloud and connect your mobile app to that instance instead of the test system. For more information about deploying the car-sharing server component, see ibm-watson-iot/iota-starter-server.
Before you deploy the IBM IoT Connected Vehicle Insights - Mobility Starter Application mobile app for iOS, ensure that the following prerequisites are met:
- The sample source code for the mobile app is only supported for use with an official Apple iOS device.
- The sample source code for the mobile app is also supported only with officially licensed Apple development tools that are customized and distributed under the terms and conditions of your licensed Apple iOS Developer Program or your licensed Apple iOS Enterprise Program.
- Apple Xcode 8.0 integrated development environment (IDE) and CocoaPods must be installed on the computer that you plan to clone the mobile app source repository onto.
Deploying the mobile app
You can download and install the mobile app on iOS and Android mobile devices. For more information about trying the Android version of the mobile app, see IBM IoT Connected Vehicle Insights - Mobility Starter Application mobile app for Android.
To try the IBM IoT Connected Vehicle Insights - Mobility Starter Application mobile app for iOS with iOS Simulator, complete the following steps:
Open a Terminal session and install CocoaPods by using the following command:
$ sudo gem install cocoapods
Clone the Mobility Starter Application source code repository for the sample mobile app by using the following git command:
$ git clone https://github.com/ibm-watson-iot/iota-starter-carsharing
Go to your Mobility Starter Application project folder, and then enter the following commands:
$ pod install
$ open MobileStarterApp.xcworkspace
Set bundle identifier and signing properly for your project in reference to Creating Provisioning Profiles Using Your Developer Account
Edit the API.swift file, and set the
defaultAppURLproperty to the URL for your IBM IoT Connected Vehicle Insights - Mobility Starter Application server app.
Go to the upper left of the Xcode UI, click Run.
To deploy the mobile app on your device, see Launching Your App on Devices.
Optional: If you would like to be notified about certain events, for example, severe weather at the pickup location, enable push notifications, as outlined in the next procedure.
To view a video recording that demonstrates how to complete the steps to deploy the mobile app, click play:
Setting up push notifications
You can optionally enable Apple Push Notifications (APN) to warn users about severe weather conditions that might be occurring at the drop off time and location of the car reservation.
To enable push notifications, complete the following steps:
Register your app ID for APNs on the Apple Developer portal.
Create an APN development SSL certificate.
Create an APN development provisioning profile.
Go to the IBM Cloud Push Notifications Dashboard and bind the APNs that you created to your server app.
Connect your iOS mobile device to your Apple Mac.
Change the bundle ID of the Xcode project to your app ID.
Edit the API.swift file, and set the
defaultPushClientSecretproperties to the App Guid and Client Secret in Mobile Options for your Push Notifications service.
static let defaultPushAppGUID = "" // (Optional) Your Push Notifications Service static let defaultPushClientSecret = "" // (Optional) Your Push Notifications Service static var bmRegion = BMSClient.Region.usSouth
In Xcode, select your iOS device as the build target and press Build and run.
On the mobile app, tap Specify Server.
To start the camera function, tap the QR code image.
From a browser, connect to the server application and display the QR code:
- If you are connecting your mobile app to the predeployed IBM test Mobility Starter Application server, can find the QR code on the Starter Experience home page.
- If you are connecting your mobile app to your own server instance, you can find the QR code for your server instance at the bottom of the following page:
- Scan the QR code from your mobile app.
For more information, see Push notifications.
Mobile Client Access service
You cannot utilize Mobile Client Access for IBM IoT Connected Vehicle Insights - Mobility Starter Application mobile app because Mobile Client Access service doesn't support custom authentication any more.
To report a defect with the IBM IoT Connected Vehicle Insights - Mobility Starter Application mobile app, go to the Issues section.
The IBM IoT Connected Vehicle Insights - Mobility Starter Application on IBM Cloud stores all of the driving data that is obtained while you use the mobile app.
Apple Developer Program License Notice
IBM is delivering this sample source code for IBM IoT Connected Vehicle Insights Starter Mobile Application to Client for further development, build and test. Client understands and confirms that further development (whether performed by the Client or by IBM acting on the Client's behalf) is undertaken under the Client's Apple Developer Program or Apple Developer Enterprise Program Agreement. The Client confirms that they have all appropriate Apple Developer Program license(s) and that the Client, as Apple's licensee, is subject to, and will comply with, the terms of the appropriate Apple Developer Program Agreement.
Questions, comments or suggestions
For your questions, comments or suggestions to us, visit [IBM IoT Connected Vehicle Insights Application community site] (https://www.ibm.com/developerworks/community/groups/service/html/communitystart?communityUuid=3b06ca1c-fd7c-4a59-a888-e5e3a8384091).