Starting a cycling navigation from another app?

Is there any way to start a cycling navigation in Maps.app from another app? This seems to work with walking and driving directions, but nothing I've tried has gotten it to work with cycling.

Have you tried this?

mapItem.openInMaps(launchOptions: [MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeCycling])

— Ed Ford,  DTS Engineer

I did try this, and got an error that MKLaunchOptionsDirectionsModeCycling was not in the SDK.

That's not true, it's been in the SDK since iOS 14. Can you share the code you are using that generates such a message?

— Ed Ford,  DTS Engineer

Is there any reason to use this preferentially to opening the URL, which seems to accomplish the same thing and opens directly in Maps.app?

It depends on your deployment target. The URL scheme approach is limited to iOS 18.4 and above, while the API symbol approach in in the SDK has been around for a much longer time.

— Ed Ford,  DTS Engineer

Starting a cycling navigation from another app?
 
 
Q