development

Routing Mode

The type of navigation directions an app provides: transit, automobile, pedestrian, cycling, or ride-share, declared in the app's Info.plist.

A routing mode is the category of transportation directions that your app offers to users through Apple Maps. When you register your app as a directions provider, you declare which modes it supports so that Apple Maps can present it as an option for the correct type of trip. The available modes are transit, automobile, pedestrian, cycling, and ride-share.

Declaring Routing Modes

You set your app’s supported routing modes in the Info.plist file under the MKDirectionsApplicationSupportedModes key. Each mode corresponds to a specific string value: MKDirectionsModeBus, MKDirectionsModeCar, MKDirectionsModeWalk, MKDirectionsModeBike, and MKDirectionsModeRideShare, among others. Transit apps can declare multiple sub-modes such as bus, subway, train, ferry, and other transit types. Your app only appears in the Apple Maps directions picker when a user requests a mode that matches one of your declared values.

Matching Modes to User Requests

When Apple Maps sends an MKDirectionsRequest to your app, the request includes the transport type the user selected. Your app should check this value and return directions appropriate for that mode. If your app supports multiple modes, it needs to handle each type correctly. A cycling app that accidentally returns driving directions will frustrate users and may lead to negative reviews. Accurate mode declarations and proper request handling ensure that your app delivers the right experience every time it is launched from Apple Maps.