# GoogleRidesharingDriver Framework Reference

# GMTDDeliveryVehicleReporter

    @interface GMTDDeliveryVehicleReporter : https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleReporter.html

Object for sending information to the Fleet Engine backend. Used for deliveries.
- `


  ### [-setVehicleStops:completion:](https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDDeliveryVehicleReporter#/c:objc(cs)GMTDDeliveryVehicleReporter(im)setVehicleStops:completion:)


  ` Updates the remaining VehicleStops for the vehicle. Results are reflected asynchronously in
  `remainingVehicleStops`. The vehicle is expected to visit the stops in the same order as the
  array.

  #### Declaration

  Swift

      func setVehicleStops(_ vehicleStops: [https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html]) async throws -> [https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html]

  Objective-C

      - (void)setVehicleStops:(nonnull NSArray<https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html *> *)vehicleStops
                   completion:
                       (nonnull https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;

  #### Parameters

  |---|---|
  | ` vehicleStops ` | The ordered array of `https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html` objects the vehicle will visit. This must be non-nil and all stops other than the first stop must have a state of `GMTDVehicleStopStateNew`. |
  | ` completion ` | A block to run after the stops have been updated. |

- `


  ### [-reportEnrouteToNextStopWithCompletion:](https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDDeliveryVehicleReporter#/c:objc(cs)GMTDDeliveryVehicleReporter(im)reportEnrouteToNextStopWithCompletion:)


  ` Updates the state of the first `https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html` in `remainingVehicleStops`
  to `GMTDVehicleStopStateEnroute`. `remainingVehicleStops` must contain at least one stop when
  this function is called.

  #### Declaration

  Swift

      func reportEnrouteToNextStop() async throws -> [https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html]

  Objective-C

      - (void)reportEnrouteToNextStopWithCompletion:
          (nonnull https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;

  #### Parameters

  |---|---|
  | ` completion ` | A block to run after the stops have been updated. |

- `


  ### [-reportArrivedAtStopWithCompletion:](https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDDeliveryVehicleReporter#/c:objc(cs)GMTDDeliveryVehicleReporter(im)reportArrivedAtStopWithCompletion:)


  ` Updates the state of the first `https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html` in `remainingVehicleStops` to
  `GMTDVehicleStopStateArrived`. `remainingVehicleStops` must contain at least one stop when this
  function is called.

  #### Declaration

  Swift

      func reportArrivedAtStop() async throws -> [https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html]

  Objective-C

      - (void)reportArrivedAtStopWithCompletion:
          (nonnull https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;

  #### Parameters

  |---|---|
  | ` completion ` | A block to run after the stops have been updated. |

- `


  ### [-reportCompletedStopWithCompletion:](https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDDeliveryVehicleReporter#/c:objc(cs)GMTDDeliveryVehicleReporter(im)reportCompletedStopWithCompletion:)


  ` Removes the first `https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html` in `remainingVehicleStops`. `remainingVehicleStops` must
  contain at least one stop when this function is called.

  #### Declaration

  Swift

      func reportCompletedStop() async throws -> [https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html]

  Objective-C

      - (void)reportCompletedStopWithCompletion:
          (nonnull https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;

  #### Parameters

  |---|---|
  | ` completion ` | A block to run after the stops have been updated. |

- `


  ### [-getRemainingVehicleStopsWithCompletion:](https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDDeliveryVehicleReporter#/c:objc(cs)GMTDDeliveryVehicleReporter(im)getRemainingVehicleStopsWithCompletion:)


  ` Gets the remaining `https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html` objects that the vehicle still needs to visit.

  #### Declaration

  Swift

      func remainingVehicleStops() async throws -> [https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html]

  Objective-C

      - (void)getRemainingVehicleStopsWithCompletion:
          (nonnull https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Type-Definitions/GMTDVehicleReporterStopCompletionHandler.html)completion;

  #### Parameters

  |---|---|
  | ` completion ` | A completion to run with the retrieved `https://developers.google.com/maps/documentation/mobility/driver-sdk/scheduled/reference/ios/Classes/GMTDVehicleStop.html` objects. The completion will be run asynchronously on the main thread. |