Post

Replies

Boosts

Views

Activity

Scene.windowIdealSize(.fitToContent) seems not working
Hi everyone, Something didn't work in my environment so I wrote some demo code: import SwiftUI @main struct DemoApp: App { var body: some Scene { WindowGroup { Color.accentColor.opacity(1/4) .frame(idealWidth: 800, idealHeight: 800) } .windowIdealSize(.fitToContent) } } I expected a 800*800 window (then +28pt top) using .windowIdealSize(.fitToContent). Otherwise I can't control these views that use up available space such as Color, Spacer, GeometryReader, etc. Was I missing something? Or this is a problem or intended framework design? Environments: macOS 15.4.1 (24E263) and 15.5 beta 4 (24F5068b) Xcode 16.3 (16E140)
2
0
55
May ’25
Xcode 16.3 repeatedly log causing CPU leak
Xcode 16.3 repeatedly logs a same message very frequently, as fast as a single thread can. I use Instruments and Console and find out the log is: Needs flush! by -[DNTBrotliDecoder decodeBytes:length:] in DNTDocumentationSupport. The call is on a single non-main thread. I've tried to clear caches and it seems doesn't change. Yet I don't know exact point when the logging starts since launch. Fortunately, this thread is dispatched at E cores, bringing approximately 2 watts of power load to my Mac. Environments: macOS 15.4 (24E248) Xcode 16.3 (16E140) M4 chip
7
3
217
Apr ’25