Supplementary for iOS

The following information enables you to create a mock trip for the mobile app.

Simulate Trips

When you start a mock trip, a route will be generated from the startLocation to the test site. Location updates will be sent to the ARRIVE server at regular intervals. To cancel a mock trip, use cancelMockTrip.

Start a Mock Trip

Use the following code snippet to start a mock trip to your test site. Replace the startLocation's latitude and longitude with a location that is two or three miles from your test site.

CLLocation *startLocation = [[CLLocation alloc] initWithLatitude:37.427507 longitude: -122.138655];
[[CSUserSession currentSession] startMockTripToSiteWithIdentifier:@"SITE_ID" fromLocation:startLocation];
let startLocation = CLLocation(latitude: 37.427507, longitude: -122.138655)
CSUserSession.current().startMockTripToSite(withIdentifier: "SITE_ID", from: startLocation)

Cancel a Mock Trip

Use the following code snippet to cancel a mock trip:

[[CSUserSession currentSession] cancelMockTrip];
CSUserSession.current().cancelMockTrip()