Add lead workflows, PDF signing, AR projects and photo gallery integration

This commit is contained in:
Dennis Nemec
2026-11-08 17:49:39 +01:00
parent a343bde741
commit 8d18873412
82 changed files with 6401 additions and 34 deletions

View File

@ -0,0 +1,28 @@
import MapKit
@MainActor
protocol CustomerLocationService {
func coordinate(for address: String) async throws -> CLLocationCoordinate2D
}
enum CustomerLocationError: Error {
case notFound
}
@MainActor
struct AppleMapsCustomerLocationService: CustomerLocationService {
func coordinate(for address: String) async throws -> CLLocationCoordinate2D {
guard let request = MKGeocodingRequest(addressString: address) else {
throw CustomerLocationError.notFound
}
let items: [MKMapItem]
do {
items = try await request.mapItems
} catch let error as MKError where error.code == .placemarkNotFound {
throw CustomerLocationError.notFound
}
try Task.checkCancellation()
guard let item = items.first else { throw CustomerLocationError.notFound }
return item.location.coordinate
}
}