Update Trip (iOS)

Explore how to update a trip on iOS with Trips v2.

The Update Trip method allows you to update your trip details at any point in time. However, you can update the stop locations as long as the trip has not started. You need to create a new object or update the existing trip, assign it with the RoamTrip() class and pass the trip object to Roam.updateTrip(trip).

Since the updateTrip method updates the existing trip, you need to pass the tripID to the trip object where the tripID is the unique identifier for your trip.

Roam.updateTrip(trip) { response, error in
    // Access trip response and error here            
}

The trip response and its parameters are similar to those of the createTrip() method.

There's no need to exclusively specify if the trip is local using a boolean value. The updateTrip() method will check that for you and update the trip details accordingly.

Last updated