I'm working on a bike application and wanted to use MapKit MKDirections to calculate some routes, on the official Apple documentation, the cycling MKDirectionsTransportType seems to be available from iOS 14+ but it's not.
Still getting the "Type 'MKDirectionsTransportType' has no member 'cycling'" error in XCode 16.4 (iOS 18.5).
When should it be available ? with iOS 26 ? It was announce in the WWDC2025
Can't found any date of availability..
2 Answers 2
I could not find any release notes indicating which Xcode version it will arrive with. However, .cycling is accessible in the Xcode 26 beta. I am using Xcode-beta (1).
@available(iOS 7.0, *)
public struct MKDirectionsTransportType : OptionSet, @unchecked Sendable {
public init(rawValue: UInt)
public static var automobile: MKDirectionsTransportType { get }
public static var walking: MKDirectionsTransportType { get }
@available(iOS 9.0, *)
public static var transit: MKDirectionsTransportType { get }
@available(iOS 14.0, *)
public static var cycling: MKDirectionsTransportType { get } //<- here
public static var any: MKDirectionsTransportType { get }
}
1 Comment
Here the final XCode 26 MapKit MKDirectionsTypes definition :
typedef NS_OPTIONS(NSUInteger, MKDirectionsTransportType) {
MKDirectionsTransportTypeAutomobile = 1 << 0,
MKDirectionsTransportTypeWalking = 1 << 1,
MKDirectionsTransportTypeTransit NS_ENUM_AVAILABLE(10_11, 9_0) = 1 << 2, // Only supported for ETA calculations
MKDirectionsTransportTypeCycling API_AVAILABLE(ios(14.0), macos(11.0), watchos(7.0), tvos(14.0), visionos(1.0)) = 1 << 3,
MKDirectionsTransportTypeAny = 0x0FFFFFFF
} API_AVAILABLE(macos(10.9), ios(7.0), tvos(9.2), watchos(1.0));