Add debug widget/live activity export and competitor research

Debug features (DEBUG builds only):
- WidgetExporter: Export all widget variants to PNG (light/dark modes)
- Live Activity lock screen export with configurable streak
- Test notifications button to preview all personality packs
- Settings buttons for export and notification testing

Research:
- Competitor analysis docs (Daylio, Bearable, Reflectly, etc.)
- App Store screenshot reference materials

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-03 09:46:03 -06:00
parent e5656f47fd
commit 406d9ee4fd
42 changed files with 2810 additions and 1 deletions

View File

@@ -128,4 +128,46 @@ class LocalNotification {
public class func removeNotificaiton() {
UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
}
// MARK: - Debug: Send All Personality Pack Notifications
#if DEBUG
/// Sends one notification from each personality pack, staggered over 10 seconds for screenshot
public class func sendAllPersonalityNotificationsForScreenshot() {
let _ = createNotificationCategory()
let packs: [(PersonalityPack, Double)] = [
(.Default, 5),
(.MotivationalCoach, 6),
(.ZenMaster, 7),
(.BestFriend, 8),
(.DataAnalyst, 9)
]
for (pack, delay) in packs {
let content = UNMutableNotificationContent()
let strings = pack.randomPushNotificationStrings()
content.title = strings.title
content.body = strings.body
content.sound = .default
content.categoryIdentifier = LocalNotification.categoryName
content.interruptionLevel = .timeSensitive
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: delay, repeats: false)
let request = UNNotificationRequest(
identifier: "debug-\(pack.rawValue)-\(UUID().uuidString)",
content: content,
trigger: trigger
)
UNUserNotificationCenter.current().add(request) { error in
if let error = error {
print("Failed to schedule \(pack) notification: \(error)")
} else {
print("Scheduled \(pack) notification in \(delay)s")
}
}
}
}
#endif
}