Overview

The Rover SDK is broken up into separate modules. Each module contains an Assembler (described below) and a collection of services. A module may also contain models and UI components.


Module Dependencies

Rover modules depend on one or more system frameworks such as UIKit or CoreLocation. In addition to system frameworks, each module may depend on other Rover modules.

The list of dependencies for each module is listed in the sidebar of the module's detail page.


Assemblers

Each Rover module comes with an assembler. Before you can use a module in your app you need to pass its assembler to the Rover.initialize method when you initialize the Rover SDK. Below is an example of initializing the Rover SDK with the RoverFoundation module.

Rover.initialize(assemblers: [
    FoundationAssembler()
])

The Rover.initialize method instantiates the shared Rover instance and gives each assembler the opportunity to register services to it. After a service has been registered it can be accessed through the Rover.shared.resolve method. Below is an example of resolving the SyncCoordinator service—defined in the RoverData module—and calling its sync() method:

Rover.shared?.resolve(SyncCoordinator.self)?.sync()

If you attempt to resolve a service defined in a module whose assembler was not included when calling Rover.initialize, the Rover.shared.resolve method will return nil.

A list of all the services in each module is included on the detail page for each module.


Module Configuration

Some assemblers accept arguments that can be used to configure the services the assembler registers. Below is an example of initializing the Rover SDK with the RoverData module and passing your account token as a configuration argument.

Rover.initialize(assemblers: [
    //...
    DataAssembler(accountToken: "YOUR_SDK_TOKEN")
])

Details on the customization options for each assembler are listed on each module's detail page.