Siri: Directions to Cheapest [fuel] AppShortcuts — OpenURLIntent hands off to Apple Maps (universal link)
This commit is contained in:
@@ -59,4 +59,12 @@ enum SiriCheapestLookup {
|
||||
plain.formatOptions = [.withInternetDateTime]
|
||||
return plain.date(from: string)
|
||||
}
|
||||
|
||||
/// Apple Maps URL for turn-by-turn directions to a point. MUST be the
|
||||
/// universal-link form (https://maps.apple.com) — OpenURLIntent rejects
|
||||
/// custom schemes like `maps://`, and the https form survives copy/paste
|
||||
/// and the share sheet.
|
||||
static func mapsURL(latitude: Double, longitude: Double) -> URL {
|
||||
URL(string: "https://maps.apple.com/?daddr=\(latitude),\(longitude)")!
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user