Siri: Directions to Cheapest [fuel] AppShortcuts — OpenURLIntent hands off to Apple Maps (universal link)

This commit is contained in:
FuelBoard Contributor
2026-08-14 13:55:03 +01:00
parent a3b6f37843
commit caadf184f2
3 changed files with 127 additions and 0 deletions
+8
View File
@@ -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)")!
}
}