Merge branch 'main' of github.com:akatreyt/Feels

This commit is contained in:
Trey t
2026-04-04 13:40:42 -05:00
41 changed files with 427 additions and 107 deletions

View File

@@ -8,6 +8,7 @@
import SwiftUI
import UIKit
import os.log
/// Exports watch view previews to PNG files for App Store screenshots
@MainActor
@@ -75,7 +76,12 @@ class WatchExporter {
// Clean and create export directory
try? FileManager.default.removeItem(at: exportPath)
try? FileManager.default.createDirectory(at: exportPath, withIntermediateDirectories: true)
do {
try FileManager.default.createDirectory(at: exportPath, withIntermediateDirectories: true)
} catch {
AppLogger.export.error("Failed to create watch export directory: \(error)")
return nil
}
var totalExported = 0
@@ -84,7 +90,12 @@ class WatchExporter {
for iconOption in allIcons {
let folderName = "\(tintOption.name)_\(iconOption.name)"
let variantPath = exportPath.appendingPathComponent(folderName, isDirectory: true)
try? FileManager.default.createDirectory(at: variantPath, withIntermediateDirectories: true)
do {
try FileManager.default.createDirectory(at: variantPath, withIntermediateDirectories: true)
} catch {
AppLogger.export.error("Failed to create watch variant directory '\(folderName)': \(error)")
continue
}
let config = WatchExportConfig(
moodTint: tintOption.tint,
@@ -241,7 +252,11 @@ class WatchExporter {
if let image = renderer.uiImage {
let url = folder.appendingPathComponent("\(name).png")
if let data = image.pngData() {
try? data.write(to: url)
do {
try data.write(to: url)
} catch {
AppLogger.export.error("Failed to write watch image '\(name)': \(error)")
}
}
}
}