Core Location has a maritime activity type, as of iOS 27
iOS 27 added .maritime to CLActivityType, and a matching .maritime to CLLocationUpdate.LiveConfiguration. There was no WWDC session about it and the iOS 27 release notes do not mention it. It appears in the SDK headers and on two documentation pages, so most of the developers who need it have not seen it.
Apple's documentation describes it as positioning for "activities in vessels on water, including while anchored", with sailing, motor-boating and traveling by ship as the examples. Both are available from version 27 on every platform.
Until now the documented choice for a boat was .otherNavigation, whose description still lists boats alongside cycling, scooters, trains and off-road vehicles. An app used on the water should set .maritime on iOS 27 and later, and keep .otherNavigation for earlier systems.
With CLLocationManager:
if #available(iOS 27, macOS 27, watchOS 27, visionOS 27, *) {
manager.activityType = .maritime
} else {
manager.activityType = .otherNavigation
}
With live updates:
let configuration: CLLocationUpdate.LiveConfiguration
if #available(iOS 27, macOS 27, watchOS 27, visionOS 27, *) {
configuration = .maritime
} else {
configuration = .otherNavigation
}
for try await update in CLLocationUpdate.liveUpdates(configuration) {
// ...
}
If location on the water has given you trouble, .maritime is the first thing to try. It is a one-line change, and the SDK header CLLocationUpdater.h describes it as "tuned for vehicular maritime use cases". Before you file a bug or write a filter for odd positions on the water, switch to it and look again.