Fix production crash points, actor-isolation warnings, and rebrand URLs
Remove all fatalError/force unwrap/force cast crash points from production
paths (ShowBasedOnVoteLogics, Random, ReflectApp, NoteEditorView). Fix
actor-isolation warnings by wrapping off-main-thread AnalyticsManager calls
in Task { @MainActor in } (LocalNotification) and replacing DispatchQueue
with Task.detached + MainActor.run (LiveActivityPreviewView). Update legal
URLs from feels.88oakapps.com to reflect.88oakapps.com in SettingsView.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -321,9 +321,12 @@ struct LiveActivityRecordingView: View {
|
||||
exportPath = outputDir.path
|
||||
print("📁 Exporting frames to: \(exportPath)")
|
||||
|
||||
// Export frames on background queue
|
||||
DispatchQueue.global(qos: .userInitiated).async {
|
||||
for streak in 1...targetStreak {
|
||||
let target = targetStreak
|
||||
let outDir = outputDir
|
||||
let outPath = exportPath
|
||||
|
||||
Task.detached(priority: .userInitiated) {
|
||||
for streak in 1...target {
|
||||
let mood = getMoodForStreak(streak)
|
||||
|
||||
let cardView = LiveActivityCardView(
|
||||
@@ -337,21 +340,21 @@ struct LiveActivityRecordingView: View {
|
||||
|
||||
if let uiImage = renderer.uiImage {
|
||||
let filename = String(format: "frame_%04d.png", streak)
|
||||
let fileURL = outputDir.appendingPathComponent(filename)
|
||||
let fileURL = outDir.appendingPathComponent(filename)
|
||||
|
||||
if let pngData = uiImage.pngData() {
|
||||
try? pngData.write(to: fileURL)
|
||||
}
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
await MainActor.run {
|
||||
exportProgress = streak
|
||||
}
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
await MainActor.run {
|
||||
exportComplete = true
|
||||
print("✅ Export complete! \(targetStreak) frames saved to: \(exportPath)")
|
||||
print("✅ Export complete! \(target) frames saved to: \(outPath)")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user