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
@@ -33,7 +33,7 @@ struct OnboardingICloudCheckView: View {
.frame(width: 100, height: 100)
Image(systemName: "icloud.fill")
.font(.system(size: 50))
.foregroundColor(.appPrimary)
.foregroundStyle(Color.appPrimary)
}
VStack(spacing: 14) {
@@ -43,7 +43,7 @@ struct OnboardingICloudCheckView: View {
Text(String(localized: "icloud_check_description"))
.font(.body)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
.padding(.horizontal, 40)
}
@@ -59,11 +59,11 @@ struct OnboardingICloudCheckView: View {
} label: {
Label("Restore from iCloud", systemImage: "icloud.and.arrow.down")
.font(.headline)
.foregroundColor(.white)
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
.padding()
.background(Color.appPrimary)
.cornerRadius(AppConstants.UI.cornerRadius)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
}
Button {
@@ -71,7 +71,7 @@ struct OnboardingICloudCheckView: View {
} label: {
Text("Start Fresh")
.font(.subheadline)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}
}
.padding(.horizontal, 24)
@@ -96,7 +96,7 @@ struct OnboardingICloudCheckView: View {
.frame(width: 100, height: 100)
Image(systemName: "checkmark.icloud.fill")
.font(.system(size: 50))
.foregroundColor(.positiveGreen)
.foregroundStyle(Color.positiveGreen)
}
VStack(spacing: 14) {
@@ -106,7 +106,7 @@ struct OnboardingICloudCheckView: View {
Text(String(localized: "icloud_enabled_description"))
.font(.body)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
.padding(.horizontal, 40)
}
@@ -123,11 +123,11 @@ struct OnboardingICloudCheckView: View {
} label: {
Text("Got it")
.font(.headline)
.foregroundColor(.white)
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
.padding()
.background(Color.positiveGreen)
.cornerRadius(AppConstants.UI.cornerRadius)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
}
.padding(.horizontal, 24)
.padding(.bottom, 40)
@@ -88,11 +88,11 @@ struct OnboardingView: View {
} label: {
Text("Continue")
.font(.headline)
.foregroundColor(.white)
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
.padding()
.background(Color.appPrimary)
.cornerRadius(AppConstants.UI.cornerRadius)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
}
Button {
@@ -101,7 +101,7 @@ struct OnboardingView: View {
} label: {
Text("Skip")
.font(.subheadline)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
}
} else {
Button {
@@ -109,11 +109,11 @@ struct OnboardingView: View {
} label: {
Text("Get Started")
.font(.headline)
.foregroundColor(.white)
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
.padding()
.background(Color.appPrimary)
.cornerRadius(AppConstants.UI.cornerRadius)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
}
}
}
@@ -144,7 +144,7 @@ struct OnboardingView: View {
categoryRepository.createDefaultCategoriesIfNeeded()
// Create default account if needed
AccountRepository().createDefaultAccountIfNeeded()
_ = AccountRepository().createDefaultAccountIfNeeded()
// Mark onboarding as complete
let context = CoreDataStack.shared.viewContext
@@ -201,7 +201,7 @@ struct OnboardingPageView: View {
Image(systemName: page.icon)
.font(.system(size: 50))
.foregroundColor(page.color)
.foregroundStyle(page.color)
}
// Content
@@ -212,7 +212,7 @@ struct OnboardingPageView: View {
Text(page.description)
.font(.body)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
.padding(.horizontal, 40)
}
@@ -255,7 +255,7 @@ struct OnboardingQuickStartView: View {
Text(String(localized: "onboarding_quickstart_subtitle"))
.font(.subheadline)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
.padding(.horizontal, 30)
}
@@ -268,8 +268,8 @@ struct OnboardingQuickStartView: View {
.frame(maxWidth: .infinity)
.padding()
.background(Color.appPrimary)
.foregroundColor(.white)
.cornerRadius(AppConstants.UI.cornerRadius)
.foregroundStyle(.white)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
}
Button(action: onImport) {
@@ -278,8 +278,8 @@ struct OnboardingQuickStartView: View {
.frame(maxWidth: .infinity)
.padding(.vertical, 12)
.background(Color.appPrimary.opacity(0.1))
.foregroundColor(.appPrimary)
.cornerRadius(AppConstants.UI.cornerRadius)
.foregroundStyle(Color.appPrimary)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
}
}
@@ -297,13 +297,13 @@ struct OnboardingQuickStartView: View {
}
.padding()
.background(Color.gray.opacity(0.1))
.cornerRadius(12)
.clipShape(RoundedRectangle(cornerRadius: 12))
Toggle("Sync with iCloud (optional)", isOn: $cloudSyncEnabled)
.padding()
.background(Color.gray.opacity(0.1))
.cornerRadius(12)
.clipShape(RoundedRectangle(cornerRadius: 12))
}
Spacer().frame(height: 8)
@@ -326,7 +326,7 @@ struct WelcomeView: View {
Image(systemName: "hand.wave.fill")
.font(.system(size: 60))
.foregroundColor(.appPrimary)
.foregroundStyle(Color.appPrimary)
VStack(spacing: 8) {
if let name = userName {
@@ -341,7 +341,7 @@ struct WelcomeView: View {
? "Your investment data has been synced from iCloud."
: "Your investment data stays on this device.")
.font(.subheadline)
.foregroundColor(.secondary)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
}
@@ -354,11 +354,11 @@ struct WelcomeView: View {
} label: {
Text("Continue")
.font(.headline)
.foregroundColor(.white)
.foregroundStyle(.white)
.frame(maxWidth: .infinity)
.padding()
.background(Color.appPrimary)
.cornerRadius(AppConstants.UI.cornerRadius)
.clipShape(RoundedRectangle(cornerRadius: AppConstants.UI.cornerRadius))
}
.padding(.horizontal, 24)
.padding(.bottom, 40)