1

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..

asked Jul 25, 2025 at 8:34

2 Answers 2

1

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 }
}
answered Jul 25, 2025 at 8:38
Sign up to request clarification or add additional context in comments.

1 Comment

Mmmh ok thank you, so I guess it will be available in September with the release of iOS 26. I was thinking of installing it to see if, but didn't find any info about it in the release notes.. Thanks
0

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));
answered Sep 17, 2025 at 8:59

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.