Remove debug prints and fix build warnings
- Remove all print statements from planning engine, data providers, and PDF generation - Fix deprecated CLGeocoder usage with MKLocalSearch for iOS 26 - Fix Swift 6 actor isolation by converting PDFGenerator/ExportService to @MainActor - Add @retroactive to CLLocationCoordinate2D protocol conformances - Fix unused variable warnings in GameDAGRouter and scenario planners - Remove unreachable catch blocks in SettingsViewModel 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -62,9 +62,7 @@ struct TripDetailView: View {
|
||||
.toolbar {
|
||||
ToolbarItemGroup(placement: .primaryAction) {
|
||||
Button {
|
||||
Task {
|
||||
await shareTrip()
|
||||
}
|
||||
shareTrip()
|
||||
} label: {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
.foregroundStyle(Theme.warmOrange)
|
||||
@@ -429,8 +427,10 @@ struct TripDetailView: View {
|
||||
let destination = stops[i + 1]
|
||||
|
||||
let request = MKDirections.Request()
|
||||
request.source = MKMapItem(placemark: MKPlacemark(coordinate: source.coordinate))
|
||||
request.destination = MKMapItem(placemark: MKPlacemark(coordinate: destination.coordinate))
|
||||
let sourceLocation = CLLocation(latitude: source.coordinate.latitude, longitude: source.coordinate.longitude)
|
||||
let destLocation = CLLocation(latitude: destination.coordinate.latitude, longitude: destination.coordinate.longitude)
|
||||
request.source = MKMapItem(location: sourceLocation, address: nil)
|
||||
request.destination = MKMapItem(location: destLocation, address: nil)
|
||||
request.transportType = .automobile
|
||||
|
||||
let directions = MKDirections(request: request)
|
||||
@@ -504,14 +504,14 @@ struct TripDetailView: View {
|
||||
exportURL = url
|
||||
showExportSheet = true
|
||||
} catch {
|
||||
print("Failed to export PDF: \(error)")
|
||||
// PDF export failed silently
|
||||
}
|
||||
|
||||
isExporting = false
|
||||
}
|
||||
|
||||
private func shareTrip() async {
|
||||
shareURL = await exportService.shareTrip(trip)
|
||||
private func shareTrip() {
|
||||
shareURL = exportService.shareTrip(trip)
|
||||
showShareSheet = true
|
||||
}
|
||||
|
||||
@@ -525,7 +525,6 @@ struct TripDetailView: View {
|
||||
|
||||
private func saveTrip() {
|
||||
guard let savedTrip = SavedTrip.from(trip, games: games, status: .planned) else {
|
||||
print("Failed to create SavedTrip")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -537,7 +536,7 @@ struct TripDetailView: View {
|
||||
isSaved = true
|
||||
}
|
||||
} catch {
|
||||
print("Failed to save trip: \(error)")
|
||||
// Save failed silently
|
||||
}
|
||||
}
|
||||
|
||||
@@ -557,7 +556,7 @@ struct TripDetailView: View {
|
||||
isSaved = false
|
||||
}
|
||||
} catch {
|
||||
print("Failed to unsave trip: \(error)")
|
||||
// Unsave failed silently
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user