We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5bedc0 commit 59fc426Copy full SHA for 59fc426
TestSamples/SwiftUICrashTest/SwiftUICrashTest/SwiftUICrashTestApp.swift
@@ -17,6 +17,8 @@ struct SwiftUICrashTestApp: App {
17
WindowGroup {
18
ContentView()
19
.onAppear {
20
+ // Moved the crash from init to onAppear to ensure the app is fully loaded before crashing.
21
+ // This prevents test flakiness on CI that occurred when the crash happened during the app launch.
22
let userDefaultsKey = "crash-on-launch"
23
if UserDefaults.standard.bool(forKey: userDefaultsKey) {
24
NSLog("SwiftUICrashTestApp - will crash")
0 commit comments