Get started
Prerequisite
Before starting DriveKit Vehicle UI integration, make sure that you have initialized Vehicle and Common UI components, especially if you have disabled the SDK auto-initialization.
Integration
The Vehicle UI module is available on Cocoapods master repo.
Then, run pod install
.
On this Github repository, you can find a demo app and the source code of Vehicle UI that you can use as an example.
Project configuration
In the vehicle detail screen, it is possible to change the picture of the vehicle. Because of this possible access to the user's Photo library or the camera, you must add the keys NSPhotoLibraryUsageDescription
and NSCameraUsageDescription
in your Info.plist
file.
Initialization
If you have disabled the SDK auto-initialization, the Vehicle UI module must also be manually initialized. In the application's AppDelegate file, import DriveKitVehicleUI
:
Then, to initialize Vehicle UI module in your app, you must call the initialization method in didFinishLaunchingWithOptions
method of your AppDelegate:
Display vehicle list
To display the vehicle list to the driver, just call the following method:
Display vehicle detail
To display the vehicle detail, just call the following method:
Display vehicle picker
To display vehicle selection screens, just call the following method:
Last updated