Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ struct SwiftUICrashTestApp: App {
WindowGroup {
ContentView()
.onAppear {
// Moved the crash from init to onAppear to ensure the app is fully loaded before crashing.
// This prevents test flakiness on CI that occurred when the crash happened during the app launch.
let userDefaultsKey = "crash-on-launch"
if UserDefaults.standard.bool(forKey: userDefaultsKey) {
NSLog("SwiftUICrashTestApp - will crash")
Expand Down
Loading