The RoverData module contains the functionality for communicating with the Rover GraphQL API. Data is sent to Rover through events added to the EventQueue. Data is retrieved from Rover by performing a sync through the SyncCoordinator.


Rover.initialize(assemblers: [
    DataAssembler(accountToken: "YOUR_ACCOUNT_TOKEN",
        endpoint: URL(string: "")!,
        flushEventsAt: 20,
        flushEventsInterval: 30.0,
        maxEventBatchSize: 100,
        maxEventQueueSize: 1000)

accountToken: String

(Required) Your Rover SDK token. This is sent in the request header of all network requests to associate them with your Rover account.

Details on where to find this value are discussed in the Installation and Initialization guide.

endpoint: URL

(Optional) The endpoint used by the GraphQL server used to send and fetch data. The default value is Rover’s production GraphQL API and you almost certainly don’t want to change this.

flushEventsAt: Int

(Optional) When the EventQueue size fills to the flushEventsAt quantity it will immediately flush its contents to the server. The default value is 20.

flushEventsInterval: Double

(Optional) While the application is active, the EventQueue runs a repeating timer and flushes its contents when the timer fires. The flushEventsInterval defines the duration between flushes in seconds. The default value is 30.

maxEventsBatchSize: Int

(Optional) The maximum number of events that can be sent to the server at a time. If the EventQueue contains more than this amount, it will cap the batch size and send the remaining events in the next flush. The default value is 100.

maxEventsQueueSize: Int

(Optional) The maximum capacity of the EventQueue. If the EventQueue reaches this capacity, and a new event is added, it will remove the oldest event first. The default value is 1000.


The following services are defined in the RoverData module and are registered by the DataAssembler:

System Frameworks
  • SystemConfiguration
  • UIKit
  • zlib