From 110906e69aa0ec18ad063643b681c256cd0a3b97 Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 22 Oct 2024 15:48:18 +0800 Subject: [PATCH] Enable "GraphReuseLogging" for Debug build (#2203) --- IceCubesApp/App/Main/IceCubesApp.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IceCubesApp/App/Main/IceCubesApp.swift b/IceCubesApp/App/Main/IceCubesApp.swift index 02b5208c..a83f844c 100644 --- a/IceCubesApp/App/Main/IceCubesApp.swift +++ b/IceCubesApp/App/Main/IceCubesApp.swift @@ -34,6 +34,14 @@ struct IceCubesApp: App { @State var isSupporter: Bool = false + init() { + #if DEBUG + // Enable "GraphReuseLogging" for debugging purpose + // subsystem: "com.apple.SwiftUI" category: "GraphReuse" + UserDefaults.standard.register(defaults: ["com.apple.SwiftUI.GraphReuseLogging": true]) + #endif + } + var body: some Scene { appScene otherScenes