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:
@@ -27,9 +27,9 @@ struct Constants {
|
||||
struct GroupUserDefaults {
|
||||
static var groupDefaults: UserDefaults {
|
||||
#if DEBUG
|
||||
return UserDefaults(suiteName: Constants.groupShareIdDebug)!
|
||||
return UserDefaults(suiteName: Constants.groupShareIdDebug) ?? .standard
|
||||
#else
|
||||
return UserDefaults(suiteName: Constants.groupShareId)!
|
||||
return UserDefaults(suiteName: Constants.groupShareId) ?? .standard
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class Random {
|
||||
static var existingDayFormat = [NSNumber: String]()
|
||||
static func dayFormat(fromDate date: Date) -> String {
|
||||
let components = Calendar.current.dateComponents([.day], from: date)
|
||||
let day = components.day!
|
||||
let day = components.day ?? 1
|
||||
|
||||
let formatter = NumberFormatter()
|
||||
formatter.numberStyle = .ordinal
|
||||
@@ -411,18 +411,18 @@ final class DateFormattingCache {
|
||||
|
||||
extension Bundle {
|
||||
var appName: String {
|
||||
return infoDictionary?["CFBundleName"] as! String
|
||||
return infoDictionary?["CFBundleName"] as? String ?? "Reflect"
|
||||
}
|
||||
|
||||
var bundleId: String {
|
||||
return bundleIdentifier!
|
||||
return bundleIdentifier ?? "com.88oakapps.reflect"
|
||||
}
|
||||
|
||||
var versionNumber: String {
|
||||
return infoDictionary?["CFBundleShortVersionString"] as! String
|
||||
return infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0"
|
||||
}
|
||||
|
||||
var buildNumber: String {
|
||||
return infoDictionary?["CFBundleVersion"] as! String
|
||||
return infoDictionary?["CFBundleVersion"] as? String ?? "0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user