Xcode 27: compila sin warnings y migra API deprecadas de SwiftUI

- Imports de CoreData que faltaban (MemberImportVisibility) en AccountsView,
  ImportDataView, ChartsContainerView y AddSourceView.
- Aislamiento MainActor: IsolatedDefaultValues en el target de la app,
  LinearGradient @MainActor, WatchSyncMessage nonisolated, closures de
  ReviewPromptService/MonthlyCheckInStore/AppIntents.
- Warnings de valores sin usar (SnapshotGapDetector, DashboardLayoutStore,
  OnboardingView, GoalEditorView, CoreDataStack, SettingsViewModel).
- foregroundColor→foregroundStyle, cornerRadius→clipShape,
  navigationBarLeading/Trailing→topBarLeading/Trailing,
  Task.sleep(nanoseconds:)→sleep(for:), NavigationLink(isActive:)→
  navigationDestination(isPresented:).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F1u4K16xy7eQVtgsYNZ9Vn
This commit is contained in:
alexandrev-tibco
2026-09-16 11:44:49 +02:00
parent 464fbb2bad
commit a8a9ad64f3
39 changed files with 420 additions and 414 deletions
@@ -17,7 +17,7 @@ struct CategoryBreakdownCard: View {
} label: {
Text("See All")
.font(.subheadline)
.foregroundColor(.appPrimary)
.foregroundStyle(Color.appPrimary)
}
}
@@ -27,7 +27,7 @@ struct CategoryBreakdownCard: View {
}
.padding()
.background(Color(.systemBackground))
.cornerRadius(AppConstants.UI.cornerRadius)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
.shadow(color: .black.opacity(0.05), radius: 8, y: 2)
}
}
@@ -55,7 +55,7 @@ struct CategoryRowView: View {
Image(systemName: category.icon)
.font(.system(size: 14))
.foregroundColor(Color(hex: category.colorHex) ?? .gray)
.foregroundStyle(Color(hex: category.colorHex) ?? .gray)
}
// Name and percentage
@@ -65,12 +65,12 @@ struct CategoryRowView: View {
Text(category.formattedPercentage)
.font(.caption)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
if let target = targetPercentage {
Text("Target \(String(format: "%.0f%%", target)) | Drift \(driftText ?? "")")
.font(.caption2)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}
}
@@ -84,10 +84,10 @@ struct CategoryRowView: View {
HStack(spacing: 4) {
Text("CAGR")
.font(.caption2)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
Text(category.metrics.formattedCAGR)
.font(.caption.weight(.semibold))
.foregroundColor(category.metrics.cagr >= 0 ? .positiveGreen : .negativeRed)
.foregroundStyle(category.metrics.cagr >= 0 ? Color.positiveGreen : Color.negativeRed)
}
}
}
@@ -122,7 +122,7 @@ struct CategoryProgressBar: View {
Text(category.formattedPercentage)
.font(.caption)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}
GeometryReader { geometry in
@@ -130,12 +130,12 @@ struct CategoryProgressBar: View {
Rectangle()
.fill(Color.gray.opacity(0.1))
.frame(height: 6)
.cornerRadius(3)
.clipShape(RoundedRectangle(cornerRadius: 3))
Rectangle()
.fill(Color(hex: category.colorHex) ?? .gray)
.frame(width: geometry.size.width * progress, height: 6)
.cornerRadius(3)
.clipShape(RoundedRectangle(cornerRadius: 3))
}
}
.frame(height: 6)
@@ -166,7 +166,7 @@ struct SimpleCategoryList: View {
Text("(\(category.formattedPercentage))")
.font(.caption)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}
}
}